flyx / OpenGLAda

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

glTexBuffer not implemented? #114

Closed rogermc2 closed 6 years ago

rogermc2 commented 6 years ago

I need glTexBuffer. Should I implement it in GL.Objects.Buffers as:

procedure Texture_Buffer (Target : Buffer_Target; Format : GL.Pixels.Internal_Format; 
                          Object : Buffer'Class);
flyx commented 6 years ago

glTexBuffer only works with GL_TEXTURE_BUFFER, so I would implement it something like this:

type Texture_Buffer_Target (<>) is limited new Buffer_Target with private;

--  ...

procedure Attach (Target : Texture_Buffer_Target;
                  Format : GL.Pixels.Internal_Format; Object : Buffer'Class);

--  ...

Texture_Buffer            : constant Texture_Buffer_Target; --  changed type
rogermc2 commented 6 years ago

OK. I've implemented it following your recommendation. I'll submit the changes with my next PR.