Jump to content
  • Advertisement
Sign in to follow this  

Dark Texture Problem

This topic is 4155 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'm making a game for class and I'm starting with the terrain map, and using a .raw file for the texture. The problem is that I was somehow able to have the texture load the correct texture color (the .raw file) that I have when I had the program coded wrong for the camera function, however, once I added the camera correctly, the texture file is dark when the program runs. This is a link to texture in jpg format:
I'm wondering how to fix this? Do, I need to rearrange the order of some of my functions and/or call something else so that it displays the correct color of the texture (.raw file)? Also, how do I avoid this happening, like if it is a function arrangment problem, how do I know what I should/should not have before another function? [Edited by - dreallink on June 5, 2007 4:38:30 PM]

Share this post

Link to post
Share on other sites
EDIT: I figured out what the problem was, but there is still a problem.
If I have the following code in the main section, the texture comes out how it is suppose to.
glutInitDisplayMode (GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGB);
glutInitWindowSize (800, 600);
glutInitWindowPosition (50, 50);
glutCreateWindow ("A basic OpenGL Window");

However, I need to use the init(); call and therefore I do not need the above section of code, but taking out the above section gives me the dark texture problem. If I leave in the above code with the init(); call, I get the following error:
GLUT: The following is a new check for GLUT 3.0; update your code.
GLUT: redisplay needed for window 1, but no display callback.

From what I understand, I don't need the function calls that I took out, but if I take them out my texture displays incorrectly.

Correct Texture:

Incorrect Texture:

Anyone have any ideas how to fix this?? I do not know how to resolve this, so any help would be appreciated. Thanks in advance.

Share this post

Link to post
Share on other sites
There are a lot of possible sources of this problem. I don't think anyone is going to be able to help you without seeing your source code (the relevant parts, that is).

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!