Bug 764 - glDrawElementBaseVertex cannot be used with ELEMENT_ARRAY_BUFFER objects
Summary: glDrawElementBaseVertex cannot be used with ELEMENT_ARRAY_BUFFER objects
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: All all
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 852
  Show dependency treegraph
 
Reported: 2013-06-24 15:19 CEST by Julien
Modified: 2013-10-09 23:19 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
jogl 4e225341fa11769c4da0825a3b5eb37464a732ef
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien 2013-06-24 15:19:37 CEST
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 "index buffer object". There is no way to force the method to understand its "Buffer indices" 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
Comment 1 Sven Gothel 2013-06-25 21:32:58 CEST
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
Comment 2 Sven Gothel 2013-07-05 05:52:19 CEST
fixed