[osg-submissions] Frag data location binding patch
Art Tevs
stud_info2 at yahoo.de
Fri Sep 7 16:19:35 PDT 2007
Hi folks,
I attached a new (small) patch to support the new glBindFragDataLocationEXT and glGetFragDataLocationEXT functions.
The function were introduced with the Shader Model 4.0 hardware. More info can be found in EXT_gpu_shader4
File Changes:
- GL2Extensions, Program and Program.cpp
Features:
- Support for fragment output binding. (e.g. You can now specify in the fragment shader varying out vec3 fragOut; fragOut = vec3(1,0,1); to write to the fragOut variable. In your program you call glBindFragDataLocation(program, 1, "fragOut") to bind the fragOut variable with the MRT 1 - GL_COLOR_ATTACHMENT1_EXT)
- new methods Program::add/removeBindFragDataLocation Program::getFragDataBindingList
ToDo:
- more hard tests are required, since the glBindFragDataLocation seems to be pretty stable or there is a problem in my app ;-)
- Probalby we can also provide something like active frag data bindings (like it is done for the vertex attribute binding) ?
Best regards,
Art
---------------------------------
Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070908/835f2a30/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BindFragDataLocation.tar.gz
Type: application/x-gzip
Size: 17189 bytes
Desc: 2353945792-BindFragDataLocation.tar.gz
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070908/835f2a30/attachment.bin
More information about the osg-submissions
mailing list