View Full Version : OpenGL textures missing
mathgenius
06-11-2004, 06:07 PM
I've been having trouble running my OpenGL game under windows. None of the textures show up; the game has only a very dim appearance like someone turned down all the lights.
It runs fine under linux, even with the same hardware. On one XP machine I tried, it worked okay the day I installed it, but the next day went to grey again.. :confused:
I don't usually post my technical problems, but I thought someone here might have come across this problem before. I've done some googling, and next I'm going to start examining dumps of all my gl calls, and comparing with a (much older) version that works.
Happy hacking,
Simon.
princec
06-12-2004, 02:02 AM
You've just set some state wrong and it shows up under your XP drivers. Are you doing anything particularly strange or clever, or sticking to 1.1 calls?
Cas :)
mathgenius
06-12-2004, 04:10 AM
Nothing tricky, just basic textures and lights.
You know, I even had this line in my code where the texture setup is called, marked with a "do not move" comment. Bah, it got moved during a refactoring, and I wonder if that's where the problems began. I'm kicking myself for making such a stupid comment :rolleyes: . As if there is any piece of code that won't get moved!
I'm still surprised about that XP box. How could it maintain such state between reboots? I dunno. It was especially demoralizing as I had come in the previous day to set it up for a demonstration, and fully expected to wow them all. Huh, what a sucker :p
I'll work it out. It must be penance for all my sins..
Simon.
illume
06-12-2004, 05:59 AM
On windows there are a few things you have to do differently compared to linux(and other sane opengl implementations).
If you change contexts(eg you go to fullscreen) you need to make new display lists and textures.
I think you also need to reinitialize all of your state? Or some of the state. At least you need to do opengl lights if you use them.
I hope you have unittests for all of your code ;) Otherwise you are in for some fun! Unittests/demos are great for porting code between operating systems and different versions of libraries/languages.
mathgenius
06-13-2004, 06:15 AM
My dear illume, I do believe you've hit the hail on the nead.
And you're the second person to recomend unit testing to me recently.. Well, I'll think about it :D
Simon.