glColor4f() problems
In lesson 19 i think, the particle one, whenever i use the particle engine with glColor4f i have problems. In my scene, whatever color i choose it colors the WHOLE scene that color! And i only want it on the particles. How in the heck can i change that?
glPush and PopMatrix() don''t help.
*site is under construction, link open soon*
After you''re done with the particles, add:
glColor4f(1,1,1,1);
This sets color back to default.
------------
http://aud.vze.com <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
glColor4f(1,1,1,1);
This sets color back to default.
------------
http://aud.vze.com <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
_______________________________________Pixelante Game Studios - Fowl Language
THANK YOU SO MUCH! now i can continue coding my entry
you are my hero until my next problem :D.

*site is under construction, link open soon*
May 29, 2002 05:51 AM
Actually LockePick''s answer is not the best programming style...
Gamer Tazar: you were right when you stsrted to find the answer in glPushMatrix(), but this function doesn''t "save" color - in simple words it saves the current position of the drawn objects (or the viewer''s position)... The function you need is glPushAttrib() and glPopAttrib() with the parameter GL_COLOR_BIT :D
IMO this''ll be better. Check MSDN for more info about this function
Good luck!
Gamer Tazar: you were right when you stsrted to find the answer in glPushMatrix(), but this function doesn''t "save" color - in simple words it saves the current position of the drawn objects (or the viewer''s position)... The function you need is glPushAttrib() and glPopAttrib() with the parameter GL_COLOR_BIT :D
IMO this''ll be better. Check MSDN for more info about this function

Good luck!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement