Author Topic: Splash Screen sizes  (Read 3792 times)

rmco2003

  • Guest
Splash Screen sizes
« on: 2006-06-02 20:31:38 »
If I change the size of the splash screen, Q-Gears resizes the texture to fit the screen, however if I use a bitmap that's 640x480 it spits out in the log that the image's dimensions are not a power of 2. OpenGL requires texture width and height to be a power of 2, but if I disable the error checking code that stops you loading textures that do not have a size that's a power of two, then it still works, albeit extremely slowley. Does anyone know how you I still manage to get away with this without it crashing? I'm not that familiar with OpenGL personally, but I got my information about the texture sizes here: http://osdl.sourceforge.net/OSDL/OSDL-0.3/src/doc/web/main/documentation/rendering/SDL-openGL.html#toTexture it seems quite relevant, considering you're using SDL.

sfx1999

  • *
  • Posts: 1142
    • View Profile
Re: Splash Screen sizes
« Reply #1 on: 2006-06-02 21:07:37 »
Add black to the ends to make it a power of two. That's really all you can do.

One thing, though, some computer's video cards can't handle extremely large textures, so you may have to break it up into smaller pieces.

rmco2003

  • Guest
Re: Splash Screen sizes
« Reply #2 on: 2006-06-02 21:32:15 »
This is just for my own amusement really, I've tried resizing the image to 640*640 which is divisible by 2, and by 128, which is the height of another image that works correctly, however it still spits out the same error message. I'm not exactly sure of what the correct dimensions are, can someone fill me in?

sfx1999

  • *
  • Posts: 1142
    • View Profile
Re: Splash Screen sizes
« Reply #3 on: 2006-06-02 22:13:53 »
POWERS of two, not multiples.

EX:

2, 4, 8, 16, 32, 64, 128, 256, 512, 1024

So, 256*1024 will work, but 256*500 will not. Just remember some older video cards can't handle stuff past 512; older ones past 256.