Advertisement

Unbinding, de-colorizing, goodgrief....

Started by November 28, 2000 01:31 PM
8 comments, last by Jjesterr 23 years, 11 months ago
OK, know how to put a texture on somehting, but how do i keep if from binding onto the next item i make? and the same with colors... help me!!! Jjesterr "A smile can take you a long way. A smile and a gun will take you even farther" - Al Capone
"A smile can take you a long way. A smile and a gun will take you even farther" - Al Capone
If you dont bind another texture you can disable texturing.

That''s how I do it anyway. As usual someone''s probably going to say I don''t know what I''m talking about and that this is the worst way to do it...

quote: and the same with colors...

How about just change the color back to what it was before?



-----------------------------Reporter: Are they slow-moving, chief?Sheriff: Yeah, they're dead. They're all messed up.-Night of the living dead
Advertisement
omg, Rudan! thats the WORST way to do it!! You have no idea what you are talking about, do you!??!
WOW!! that was so , nevermind

I mean i dont know HOW to disable texturing, and i dont want any colors at all (cuz its a texture)

get my meaning ?

Jjesterr
Engaged in a Menage a moi



"A smile can take you a long way. A smile and a gun will take you even farther" - Al Capone
"A smile can take you a long way. A smile and a gun will take you even farther" - Al Capone
rudan''s right gl''s a state machine thus the texture will always remain bound until bind another one.

glBindTexture2D(...)
draw object
glDisable(GL_TEXTURE_2D);
glColor4f(1,1,1,1);
draw another object with no texture in plain white

http://members.xoom.com/myBollux
OK, glDisable works, but its permanent.... and what do you mean drawing something in white?

"A smile can take you a long way. A smile and a gun will take you even farther" - Al Capone
"A smile can take you a long way. A smile and a gun will take you even farther" - Al Capone
Advertisement
He meant without any particular color except white...

You can change the values (of the call to glColor4f) to change the color, in other words.


http://www.gdarchive.net/druidgames/
"OK, glDisable works, but its permanent.... "

its permant until u enable it again remember ''statemachine''

glBindTexture2D(...)
draw object
glDisable(GL_TEXTURE_2D);
glColor4f(1,1,1,1);
draw another object with no texture in plain white
glEnable(GL_TEXTURE_2D);



http://members.xoom.com/myBollux
quote: thats the WORST way to do it!! You have no idea what you are talking about, do you!??!


Damn, I just knew it!
-----------------------------Reporter: Are they slow-moving, chief?Sheriff: Yeah, they're dead. They're all messed up.-Night of the living dead
Instead of glDisable(GL_TEXTURE_2D); you can use
glBindTexture(GL_TEXTURE_2D, 0);

probably an unorthodox method, but it works on my geforce.

Nutty

This topic is closed to new replies.

Advertisement