flyx / OpenGLAda

Thick Ada binding for OpenGL and GLFW
flyx.github.io/OpenGLAda/
MIT License
96 stars 13 forks source link

Draw_Elements does not allow you to specify the offset of the index buffer. #93

Closed AdaDoom3 closed 7 years ago

AdaDoom3 commented 7 years ago

I think this is a major feature of the API and should not be zero'ed out as it is currently.

flyx commented 7 years ago

What exactly is missing? GL.Objects.Buffers provides Array_Buffer and Element_Array_Buffer and has Draw_Elements.

AdaDoom3 commented 7 years ago

Indeed, my mistake. I was looking at the "element array buffer offset" parameter being set to Low_Level.Zero as it was labeled "Indicies" when you imported it.

procedure Draw_Elements (Mode : Connection_Mode; Count : Size; Index_Type : Unsigned_Numeric_Type; Indices : Low_Level.Zero);

AdaDoom3 commented 7 years ago

Thanks for the quick response BTW : )

flyx commented 7 years ago

Ah yes, that is one of those very strange parts of OpenGL where the function takes a void pointer which actually is an integer offset for whatever reason. So you actually found a missing feature: OpenGLAda does not allow you to specify that offset. I'll rename the issue, this should be fixed.