• Advertisement


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

blending,spheremapping makes bitmapcharacters dark

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

Hi, I am trying out and experimenting with nehe tutorial number 26 (great tutorial btw), and would also like to print some white GlutBitmapCharacters, as well as some white glPoints with (glBegin(GL_POINTS)). However, I noticed that they are always dark when the following section of code is run. glBindTexture(GL_TEXTURE_2D, texture[2]); // Select Texture 3 (2) glColor4f(1.0f, 1.0f, 1.0f, 0.4f); // Set Color To White With 40% Alpha glEnable(GL_BLEND); // Enable Blending glBlendFunc(GL_SRC_ALPHA, GL_ONE); // Set Blending Mode To Mix Based On SRC Alpha glEnable(GL_TEXTURE_GEN_S); // Enable Sphere Mapping glEnable(GL_TEXTURE_GEN_T); // Enable Sphere Mapping gluSphere(q, 0.35f, 32, 16); // Draw Another Sphere Using New Texture // Textures Will Mix Creating A MultiTexture Effect (Reflection) glDisable(GL_TEXTURE_GEN_S); // Disable Sphere Mapping glDisable(GL_TEXTURE_GEN_T); // Disable Sphere Mapping glDisable(GL_BLEND); // Disable Blending which leads me to believe that enable blending will make objects with no normals defined become dark? Am I correct? If this is the case, how can I fix it so that they will appear as white when blending/sphere mapping is enabled? Thanks!

Share this post

Link to post
Share on other sites

  • Advertisement