
ColorAttachment enums on ReadBufferMode?
Posted Wednesday, 2 September, 2009 - 17:17 by zahirtezcan inI tried using FrameBuffers for rendering to a bitmap file. the idea is first rendering to a texture via framebuffer and then reading pixels from framebuffer for IO. It sufficed to set draw buffer to colorattachment_zero and render to framebuffer. But while setting read buffer (GL.ReadBuffer(ReadBufferMode)) Front, left etc. all resulted in InvalidEnum error(using OpenTK in debug mode). however (ReadBufferMode)(int)DrawBufferMode.ColorAttachment0 gave the desired result. Is non-existance of attachments on ReadBufferMode is intended? (So, am i doing something wrong?) Or is it forgotten?


Comments
Re: ColorAttachment enums on ReadBufferMode?
This is a bug, ReadBufferMode should contain the ColorAttachment[n] tokens according to ARB_framebuffer_object:
Table 10.nnn: Arguments to DrawBuffer(s) and ReadBuffer when the context is bound to a framebuffer object, and the buffers they indicate. i in COLOR_ATTACHMENTi may range from zero to the value of MAX_COLOR_ATTACHMENTS - 1.
Could you please file a bug report so this issue doesn't get lost?
Re: ColorAttachment enums on ReadBufferMode?
Submitted
Re: ColorAttachment enums on ReadBufferMode?
Thank you.