Sounds like you have a bug in your code. You shouldn't need to do any extra
work to combine the texture with the output of lighting.

Keep in mind that the default GL_MODULATE is a multiplication, so red
(1,0,0) times green (0,1,0) equals black (1*0==0, 0*1==0, 0*0==0).

If something is happening to your texture coordinates, then the default
(0,0) will almost certainly look up "black" as the color. And with
GL_MODULATE, you'll get black.

Just for testing, you might try setting GL_REPLACE for the TexEnv; you
should just see the texture in that case. If that works, it means your
texture isn't getting blown away and your texture coordinates are correct.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Rabbi
Robinson
Sent: Saturday, May 23, 2009 4:47 PM
To: [email protected]
Subject: [osg-users] texture and material of geode

Hi,

I run into problem when I assigned both material and texture to a geode. If
I have just either material(ambient, diffuse, etc) or texture, it worked
fine. However, if I have both of them, the geo looks black. Is there thing I
need to do to blend the texture and the material?

Thank you!

Cheers,
Rabbi

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=12849#12849





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to