Skip to main content
GameDev.net gamedev.net
🔒 Locked

Fullscreen image problems

Started by PiNtoS Feb 23, 2008 at 5:55 PM 4 replies 1k views
Original Post
PiNtoS
PiNtoS
I'm running my game in 1024x768 resolution, and the images look fine in windowed mode. But when I go to fullscreen, I get some strange stretching. My monitor is still 4:3, but its native resolution (I think) is 1280x960, or something like that. The main problem seems to be for fullscreen images. The image that follows is 1024x768, and looks fine when run in windowed mode: clicky But when run fullscreen, it doesn't look so good: clicky Is there anything I can do to fix this? (By the way, I'm working in OpenGL.) [Edited by - PiNtoS on March 1, 2008 3:56:19 PM]
PiNtoS
PiNtoS
*bump*

Were people ignoring this because I embedded the images? Now they're links :)

Any ideas?
emeyex
emeyex
I may be blind, but it doesn't look like stretching, it looks more like there's some kind of banding going on in your background image - maybe related to alpha blending, or dithering? Are your full screen settings the same for all your buffers, bit-depth-wise?
PiNtoS
PiNtoS
Yeah, banding is probably the right word.

Anyways, I'm using SDL with OpenGL, and I'm setting up the window like so:

const SDL_VideoInfo *pVideoInfo = SDL_GetVideoInfo();m_videoFlags = SDL_OPENGL | SDL_GL_DOUBLEBUFFER | SDL_HWPALETTE | SDL_RESIZABLE;// Can surfaces be stored in memory?if(pVideoInfo->hw_available)    m_videoFlags |= SDL_HWSURFACE;else    m_videoFlags |= SDL_SWSURFACE;// Can we do hardware blits?if(pVideoInfo->blit_hw)    m_videoFlags |= SDL_HWACCEL;if(fullscreen)    m_videoFlags |= SDL_FULLSCREEN;SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);m_pSurface = SDL_SetVideoMode(1024, 768, 16, m_videoFlags);
djsteffey
djsteffey
correct me if i am wrong....

when you are windowed, then you will use the resolution of your desktop (ie 24 bit or 32 bit) so in windowed mode you are running in 24 or 32 bit despite requesting 16 bit.

in fullscreen, you are actually getting the 16 bit you are requesting. 16 bit isnt enough to make smooth transitions between different colors. so the different shades of black in that image "jump" at different areas as it tries to go from one shade of black to another.

run the fullscreen in 24 or 32 bit and you shouldnt have a problem
PiNtoS
PiNtoS
Silly me - that works fine.

Thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.