PDA

View Full Version : Difference between glDrawBuffer and glDrawBuffers



vikram
07-18-2013, 08:57 AM
Both appear to be defined in opengl 4.0 specifications and both "specify which color buffers are to be drawn into".
Is the only difference that in glDrawBuffers we can specify multiple buffers at once?
i.e
GLenum x = GL_FRONT;
glDrawBuffers(1,&x) is same as glDrawBuffer(GL_FRONT)?

or is the difference that we can specify color attachment points in glDrawBuffers and cant do so in glDrawBuffer.

Nowhere-01
07-18-2013, 10:47 AM
http://archive.gamedev.net/archive/reference/programming/features/fbo2/page5.html

more practical explanation. in short, glDrawBuffers used to draw to multiple attachments. you can output different data for each rendertarget, using multiple fragment shader outputs.

you can google "opengl MRT". 'MRT' stands for Multiple Render Targets