How not apply lightning on texts?
Hi, Im trying to make a scene containing a 3d shape, a light and some texts.
Everything were fine, but how can I exclude the lightning for texts, or others specified shapes?
You can disable all lighting with glDisable(GL_LIGHTING) before drawing the text objects, then switch it on with glEnable(GL_LIGHTING) afterwords.
Or you could use a light specific light sourse for the text by first switching of the stantard one whith glDisable(GL_LIGHT#a), then switch on the light for the text with glEnable(GL_LIGHT#b), then draw the text. Afterwards: glDisable(GL_LIGHT#b), glEnable(GL_LIGHT#a). (where #a is the number of the standard light and #b the number of the text light.)
/Lidestro
Or you could use a light specific light sourse for the text by first switching of the stantard one whith glDisable(GL_LIGHT#a), then switch on the light for the text with glEnable(GL_LIGHT#b), then draw the text. Afterwards: glDisable(GL_LIGHT#b), glEnable(GL_LIGHT#a). (where #a is the number of the standard light and #b the number of the text light.)
/Lidestro
Quote:Original post by GreyHound
switching GL_MODULATE to GL_REPLACE should also work, shouldn´t it?
Say that was the answer he got and he said "Thank you, problem is now solved". After all, he got the result he wanted.
Then he starts working further on his application and adds another object that doesn't need lighting, but don't involve textures. Lighting is still enabled, he have a problem, and comes here and as "How do I disable lighting so it doesn't affect my object"?
Was the problem solved the first time? No, it wasn't. You exclude lighting by disabling lighting, not by switching texture combiner settings.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement