<?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>764</bug_id>
          
          <creation_ts>2013-06-24 15:19:37 +0200</creation_ts>
          <short_desc>glDrawElementBaseVertex cannot be used with ELEMENT_ARRAY_BUFFER objects</short_desc>
          <delta_ts>2013-10-09 23:19:08 +0200</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>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>852</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Julien">julien.carlos</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>---</cf_type>
          <cf_scm_refs>jogl 4e225341fa11769c4da0825a3b5eb37464a732ef</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2710</commentid>
    <comment_count>0</comment_count>
    <who name="Julien">julien.carlos</who>
    <bug_when>2013-06-24 15:19:37 +0200</bug_when>
    <thetext>Since OpenGL 3.1 core profile, vertex indices must be passed in a buffer object bound to ELEMENT_ARRAY_BUFFER. It seems that glDrawElementBaseVertex is working like a charm when sourcing indices from client memory (using Buffer backing arrays of ints or shorts) which is ok when using the compatibility profile but it does not work with &quot;index buffer object&quot;. There is no way to force the method to understand its &quot;Buffer indices&quot; argument as an offset into the current buffer object bound to ELEMENT_ARRAY_BUFFER.

Actually it would be nice to have such a signature (like we have for glDrawElements):
glDrawElementsBaseVertex(int mode, int count, int type, long indices_buffer_offset, int basevertex)

Other methods should follow the same paradigm:
glDrawElementsInstanced
glDrawRangeElementsBaseVertex
glDrawElementsInstancedBaseVertex</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2716</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-06-25 21:32:58 +0200</bug_when>
    <thetext>agreed - thank you!

actually all 8 are of kind buffer object:

BufferObjectKind Element glDrawElements
BufferObjectKind Element glDrawElementsBaseVertex
BufferObjectKind Element glDrawElementsInstanced
BufferObjectKind Element glDrawElementsInstancedBaseInstance
BufferObjectKind Element glDrawElementsInstancedBaseVertex
BufferObjectKind Element glDrawRangeElementsBaseVertex
BufferObjectKind Element glDrawRangeElements
BufferObjectKind Element glDrawRangeElementsBaseVertex

.. will add this ASAP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2780</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-07-05 05:52:19 +0200</bug_when>
    <thetext>fixed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>