Hi,
Gottfried Gross wrote:
Hi,
I have a question concerning buffers in OSG.
In OpenGL I can define a clearColor then set the buffer by calling
glDrawBuffer() and finally call glClear() to make it happen. Unfortunately I
could not find out so far how to do this in OSG.
I recognized that I can set the clearColor in the osg::camera class, but how is
glClear() performed then and how can I define different clearColors for
different buffers?
Use multiple cameras?
Also I would like to switch buffers each rendering pass, so that for example
when I write gl_FragData[0] in a shader, in the first pass I want buffer1 to be
gl_FragData[0] and buffer2 to be gl_FragData[1]. In the following pass I want
to switch buffers, so buffer2 becomes gl_FragData[0] and vice versa.
Do I need a callback function to realize this in OSG? (maybe using
setPostDrawCallback())
you can do it 'n a callback or manually. See osggameoflife for an
example of the type of ping-pong you want to do.
jp
Thank you!
Cheers,
Gottfried
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23838#23838
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org