Jump to content
  • Advertisement
Sign in to follow this  
nimgnay

OpenGL Weired Snow Color Problem

This topic is 4360 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

I am currently doing one course project, and planning to draw a falling snow scene in Opengl. I applied a background image using texture mapping, which the main color of the image is grey. When i try to draw the white snow in front of it, the falling snows are becoming grey color also. If i change the background image to some red image, the snow flakes become red. May i know why it happens? How should i resolve it? I disabled the blending in my initialization proces..

Share this post


Link to post
Share on other sites
Advertisement
Disable texture mapping before you draw the snow. Somthing like this:

drawBackground( );
glDisable( GL_TEXTURE_2D );
drawSnow( );


The problem is that if you have texture mapping on, it will blend the texture with the current drawing color.

The really weird thing is that I had the exact same problem with a course last semester! My snow was grey too. Too weird!

Share this post


Link to post
Share on other sites
disable the texture b4 drawing the snow or bind another texture if u have snow texture

Share this post


Link to post
Share on other sites
Simian & ff8, you are the guru! Thanks to Songho too! The opengl world becomes beautiful with your guys around!

Share this post


Link to post
Share on other sites
Quote:
Original post by Simian Man
The really weird thing is that I had the exact same problem with a course last semester! My snow was grey too. Too weird!


Maybe he follows the same course;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!