SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_BUFFER_SIZE, 32 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
// SDL_OPENGLBLIT allows SDL to draw alongside OpenGL
// Use SDL_OPENGL if OpenGL exclusive application
Uint32 flags = SDL_OPENGL | SDL_HWSURFACE;
if ( _fullscreen ) {
flags |= SDL_FULLSCREEN;
}
_screen = SDL_SetVideoMode( _windowWidth, _windowHeight, 16, flags );
if ( !_screen ) {
printf( "ERROR: Unable to initialize SDL screen: %s", SDL_GetError( ));
return false;
}
if ( !( _screen->flags & SDL_HWSURFACE )) {
printf( "WARNING: Can't get hardware surface\n" );
}
Fullscreen display colors and blends incorrectly
This could possibly be an SDL issue, as I am using SDL to set up an OpenGL rendering context.
Anyway, I have been testing an application in windowed mode until today. Unfortunately, when I entered fullscreen mode the colorating and blending seem to be functioning incorrectly.
Windowed example:
Fullscreen example:
I thought that it might be texture related, but rendering a three colored triangle displays the same poor effects.
My SDL initialization code is:
I get the warning when in windowed mode so I believe that to be the source of the issue.
Thanks in advance.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement