Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while switching OGL->2D framebuffer #265

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

error while switching OGL->2D framebuffer #265

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
wontfix This will not be worked on

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 1.2.11
Reported for operating system, platform: Windows (XP), x86

Comments on the original bug report:

On 2006-12-30 16:51:02 +0000, Tomek Kazmierczak wrote:

I've recently noticed a bug in some part of SDL_video. This bug seems to be related only
to the windows version of the SDL, but I'm not sure - I've tested my SDL app only under
linux and under windows and it apeared olny under windows.

My app (it's a game) renders a 'menu' in the 2D mode (2D SDL framebuffer) and the game play
uses 3D mode (OpenGL). When one starts the game-paly the app swithces to the OpenGL mode
(with SDL_SetVideoMode of course;). When the player quits the game-play the app switches
back to the 2D framebuffer.
Under linux everything is OK, but under windows sometimes when switching from OGL to 2D fb
the screen is not beeing updated with menu's image but one can see the last image generated
by the OpenGL. The menu is running (I'm sure about that!) but the SDL does not display
it's image.

This happens only When the video mede is changed from 3D to 2D framebuffer with out
changing the screen resolution (when screen width, height and bpp are not changed), eg.

//swithch to OpenGL when entering the game
SDL_SetVideoMode(640, 480, 24, SDL_HWSURFACE | SDL_FULLSCREEN | SDL_OPENGL);

//play the game
...

//switch back to 2D fb when entering the menu
SDL_SetVideoMode(640, 480, 24, SDL_HWSURFACE | SDL_FULLSCREEN | SDL_DOUBLEBUF);

//oops! I can hear the in-menu music but I can see only the last image rendered by OGL!

When changing either only the screen size or only the bit depth everything works fine (eg.
when in 3D mode the resolution is 800x600x24 and in the menu it is 640x480x24).

I think it has sth. to do with the OpenGL's rendering context, or something like that -
when I was trying to find the source of such behaviour I've noticed that it never happens
if I comment out all calls to SDL_GL_SwapBuffers. Of course I can't see anything but a
black screen during the game-play then, but when going back to the menu everything is OK
(menu appears normally).

On 2007-07-07 21:22:37 +0000, Sam Lantinga wrote:

Any chance you can attach a test case? Maybe you can modify the testgl test program to exhibit the problem?

On 2007-07-08 23:50:44 +0000, Ryan C. Gordon wrote:

Bumping some bugs' priorities to P1 for consideration before the 1.2.12 release (though some may not be resolved for 1.2.12).

--ryan.

On 2007-07-19 01:18:42 +0000, Sam Lantinga wrote:

Any update on this?

On 2009-09-13 16:33:29 +0000, Ryan C. Gordon wrote:

Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.

On 2009-09-20 22:41:51 +0000, Sam Lantinga wrote:

This hasn't been updated in a couple years. Please reopen this if it's still active in 1.3.

@SDLBugzilla SDLBugzilla added bug wontfix This will not be worked on labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant