Hi Bjoern,
[EMAIL PROTECTED] wrote:
Dear all,
How do use a different material and different colors on the front and
back side of the polygons?
I have a simple quadrangle with colors (and secondary colors -> where
are these used?") set. I
would like to render the front and back side of this polygon
differently, e.g. with a general material
on the front (not using the colors on the vertices) and using the
colors from the vertices on the back
side: I tried the code below. When I change values for the front side
(for example setting
ColorMaterial to GL_DIFFUSE) this always seems to affect both sides.
...
Generally I would expect your code to work, but I vaguely remember some
badly defined situations involving color material, I need to check the
spec to see if I remember what it was.
-----------------------------------------------------------------------------------------------------
I also tried to use a SimpleMaterial for the front. Then I added a
MaterialChunk where I
set another SimpleMaterial as BackMaterial. I could have different
material on the back
and front but found it difficult to predict the result .......
What is the right way to do what I want ? What is the secondary Color
for and how do
I make use of it?
OpenGL has a lighting mode that uses the secondary color after
texturing, to allows material highlights on textures. For your problem
they won't help you.
Yours
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users