<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1291</bug_id>
          
          <creation_ts>2016-02-17 17:59:23 +0100</creation_ts>
          <short_desc>params of glGetQueryObjectuiv has to be interpreted as an offset in case GL_QUERY_BUFFER is bound</short_desc>
          <delta_ts>2019-03-29 13:58:09 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>opengl</component>
          <version>tbd</version>
          <rep_platform>pc_x86_64</rep_platform>
          <op_sys>windows</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Giuseppe Barbieri">elect86</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs></cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>5545</commentid>
    <comment_count>0</comment_count>
    <who name="Giuseppe Barbieri">elect86</who>
    <bug_when>2016-02-17 17:59:23 +0100</bug_when>
    <thetext>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

&quot;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&apos;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. &quot;


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

    </bug>

</bugzilla>