Forlom's picture

GL.DrawBuffer()

Hi,

I think the above mentioned function should accept GL_COLOR_ATTACHMENTn_EXT, in order to allow the use of framebuffer objects or is there an equivalent function which works with fbos?

Thank you,
Bye


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler.'s picture

The opengl specs are 20 years old - there are several little problems like this, missing enums and so on.

You can work around the issue (and all similar issues), by using code like this:
GL.DrawBuffer((OpenTK.OpenGL.Enums.DrawBufferMode)OpenTK.OpenGL.Enums.GLenum.COLOR_ATTACHMENT0_EXT);

'OpenTK.OpenGL.Enums.GLenum' (called 'GL.Enums.All' in the not-yet-released OpenTK 0.3.9) contains all available opengl enums, so if a specific one is missing you can always find it there and cast it to the appropriate type. I have tried reporting such bugs to the opengl spec group, but with OpenGL 3 so close now, they probably won't get fixed.

Forlom's picture

Ah ok thank you.