
Wed, 08/17/2022 - 10:43
I'm trying to create a vbo containing integer types and a shader for it but i'm only getting garbage values for the integers. As soon as i'm switching to floats everything works as expected.
I checked every Graphic3d_ShaderAttribute
in the Graphic3d_ShaderAttributeList
list and the shader code but everything seems fine.
I'm not a opengl pro but unable to detect problems in my code i debugged the opengl part of occt line by line and found OpenGl_VertexBuffer::bindAttribute
where glVertexAttribPointer
(khronos docs) is used.
If i understand the khronos docs about vertex formats correctly
For integer (both signed and unsigned), you must use glVertexAttribIPointer.
then this might be a bug and would explain what i'm observing.
Am i missing something obvious or should OpenGl_VertexBuffer::bindAttribute
handle floats, integers and double precision attributes separately with glVertexAttribPointer
, glVertexAttribIPointer
and glVertexAttribLPointer
respectively?
Wed, 08/17/2022 - 11:10
Integer vertex attributes are currently not propagated to OpenGL API - see corresponding feature request (with prototyped incomplete patch). Double-precision floats are also not handled / supported.