Bug 1291

Summary: params of glGetQueryObjectuiv has to be interpreted as an offset in case GL_QUERY_BUFFER is bound
Product: [JogAmp] Jogl Reporter: Giuseppe Barbieri <elect86>
Component: openglAssignee: Sven Gothel <sgothel>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: P4    
Version: tbd   
Hardware: pc_x86_64   
OS: windows   
Type: DEFECT SCM Refs:
Workaround: ---

Description Giuseppe Barbieri 2016-02-17 17:59:23 CET
public void glGetQueryObjectuiv(int id, int pname, int[] params, int params_offset)

works fine when you expect the result on params. 

But there is one option when this is not the case, https://www.opengl.org/sdk/docs/man/html/glGetQueryObject.xhtml

"If a buffer is bound to the GL_QUERY_RESULT_BUFFER (they mean GL_QUERY_BUFFER) target, then params is treated as an offset to a location within that buffer's data store to receive the result of the query. If no buffer is bound to GL_QUERY_RESULT_BUFFER (GL_QUERY_BUFFER), then params is treated as an address in client memory of a variable to receive the resulting data. "


Reference http://stackoverflow.com/questions/35451405/glgetqueryobjectuiv-bound-query-buffer-is-not-large-enough-to-store-result