Hi Dominik,
On Sun, 2004-02-29 at 08:28, Dominik Rau wrote:
> Hi.
> I've found this OpenGL tutorial about rendering (faked) water caustics
> with OpenGL:
>
> http://www.opengl.org/resources/code/rendering/mjktips/caustics/
> http://www.opengl.org/resources/code/rendering/mjktips/caustics/underwater.c
>
> What would be the right way to do this in OpenSG? If I would do it with
> blending, I think that I have to use the BlendChunk and the TexGenChunk,
> but I don't really get how to use them with the scenegraph from the
> testState*.cpp examples. Btw, is it really necessary to use a second
> render pass here? Wouldn't it be easier to use multitextures?
Yup, but Mark's demo needed to run on sgis, too, so MT was not an
option. If your hardware supports MT I would definitely use it.
The StateChunks are only the building blocks, to use them you need to
add them to a Material that is derived from ChunkMaterial. Take a look
at testMaterialRedner.cpp for an example.
For Multitexturing you need to add multiple TextureChunks to the
Material, and the same number of TexGenChunks if you want to use them.
The TexGenChunk now has a beacon that allows you to define a reference
coordinate system for the EYE_LINEAR gen mode, which is easiert to
control than te plane parameters in OBJECT_LINEAR mode, and also
respects the transformations on top of the node. But for getting it to
work OBJECT_LINEAR, as in Mark's example, is probably fine.
Hope it helps
Dirk
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users