Archived

This topic is now archived and is closed to further replies.

I see black things...

This topic is 5015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

glDisable(GL_TEXTURE_2D); glDisable(GL_LIGHT0); glDisable(GL_LIGHTING); glEnable(GL_COLOR_MATERIAL); glColor4f(1,1,1,1); glDrawArrays(...); Im using the above code to render text, models etc... But all i see is black, its only just happened in my engine and ive no idea why. http://meshman.no-ip.com/bmw.jpg The text in that screenshot is usually different colors, and the mouse is textured, but as you see...black. Can someone tell me what states or things could be causing this? Thanks.

Share this post


Link to post
Share on other sites
Why are you disabling GL_TEXTURE_2D?

GL_COLOR_MATERIAL affects texture coloring only, AFAIK. If you want textures that are colored, comment out the glDisable(2d textures), and if you just want colors, comment out glEnable(material coloring).

That ought to work, but I''m still learning all this.



"TV IS bad Meatwad...but we f***in need it"

If you''re a girl under the age of 12, and you''re high on marijuana...don''t ride your bike. -TRUTH

Share this post


Link to post
Share on other sites
glEnable(GL_TEXTURE_2D);
glDisable(GL_LIGHT0);
glDisable(GL_LIGHTING);
glDisable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
glEnable(GL_COLOR_MATERIAL);
glColor4f(1,1,1,1);

still gives black...

Share this post


Link to post
Share on other sites
quote:
Original post by Boku San GL_COLOR_MATERIAL affects texture coloring only, AFAIK.


Not true. It''s what you need to use whenever you enable lighting without setting materials, so imagine how annoying it would be to have to texture all of your lit objects.


"Gay marriage will encourage people to be gay, in the same way that hanging around tall people will make you tall." - Grizwald

Share this post


Link to post
Share on other sites