The online documentation at http://www.khronos.org/opengles/sdk/docs/man/ does not give reference to the glBindFragDataLocation(GLuint program, GLuint colorNumber, const char * name);
method. What is the equivalent to this in OpenGL es 2.0?
There is not equivalent, read below.
OpenGL ES 2.0 does not allow to emit more than one fragment output, you either write to gl_FragColor
or gl_FragData[0]
. This is one of the things that with plain OpenGLES 2.0 makes really slow deferred shading since you cannot define multiple targets.
If you are on Tegra you can slightly change your program to emit gl_FragData[i]
using NV_draw_buffers
extension, but you cannot use an user defined out variables, there is only gl_FragData[i]
out variable that could output to different attachments.
That being said, and trying to answer your question, you need to change your fragment shader to use gl_FragColor
or gl_FragData[0]
, there are not user defined out variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With