Sajjadul Islam wrote:
> Hello Carsten,
> 
> Sorry for attaching the wrong code snippet.
> 
> I have found out that if i do not load the texture, then  the point
> light effect is visible,
> but with texture it is not, 
> 
> How to get around with that?
>

the default texture function of OpenGL is GL_REPLACE and that is what
the SimpleTexturedMaterial uses as default for the envMode field. Also
my OpenGL book recommends using a specular color of white for objects
and let the texture provide the diffuse color.

If you modify your code to contain lines like:

beginEditCP(texEarth);
        texEarth->setImage(imageEarth);
        texEarth->setEnvMode(GL_MODULATE);
        texEarth->setSpecular(Color3f(1.0f, 1.0f, 1.0f));
endEditCP(texEarth);

you will get the desired effect.

        Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to