tags:

views:

85

answers:

1

So I'm making something in openGL using SDL. I'm about to take a long flight, and I can't seem to get the project to work on my laptop. I've used SDL on my laptop before, so I'm left thinking it is openGL's fault. The laptop is on win xp pro, and has an intel 945 graphics "card." I've tried updating the drivers, but to no avail. The images I'm using can't be the problem because I have it coded so the program closes if it can't locate the file. Also, I get no errors at all when compiling, it just creates the window, and instead of all my images, I get white. Just white.

Any ideas? Please, I don't want to be on this 5 hr flight and go stir crazy =/

+2  A: 

You might need to provide a bit more info, but at a guess I'd say your textures are invalid. OpenGL draws white when there is a texture problem. Possible reasons are...

  • Image size is bigger than the max texture size of the graphics chip

  • Image isn't power of 2 and the card doesn't support rectangular textures.

  • You have run out of texture memory.

  • Your texture env isn't supported by the graphics chip, eg. unsupported format.

  • You aren't drawing what you think you are drawing, eg a white quad on a white background, in the position you think you are drawing it, ie you're looking in the wrong direction.

  • Programmer error.

Try drawing a single 128x128 texture on a single quad with a glcolor of purple and a clear colour of orange. This will eliminate most of the above problems and give you something to debug.

Henry
It's been a while, but maybe this can help someone else. I knew about the power of 2, however, it slipped my mind that my desktop has a much new/better gfx card than my laptop does. So while my desktop could compensate for the non-power-of-2-sizes, my laptop's gfx card could not.
Justen