-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think that we, all here agree with the fact that SDL should provide a way
to avoid destroying the context when the OS gives a way to.
The real problem which is discussed for a mail or two, now, is weither or not
the good solution would be to patch the current SDL 1.2.x series or to apply
this patch to the 2.x series (which is currently under heavy development as I
can see) to avoid breaking already existing applications.
For my own, not changing the default behaviour of SDL_SetVideoMode is a good
solution, adapt it to support a specific flag for cases where the application
is aware of the new possibility is better. We could even think of a still
better solution : adding support for the detection of a special variable in
the environment for cases where the application was developed under Windows
(and tested only there) and thus have a “small inefficiency bug” under other
OS’s. This way, the user can control the behaviour at wish … even if the
source code of the application is not provided or (s)he is not a developer.
=-)
Le vendredi 4 Juin 2004 11:36, Vasileiou Nikolaos a ?crit :
Under linux, re-calling setVideoMode DOES NOT kill the context, so
textures would be loaded twice…
Under Windows it DOES destroy it.
I think that the only reason someone wants to call setVideoMode after a
resize event, is so that internall SDL mouse structures are updated (at
least under windows). If you dont call setVideoMode, then the opengl
display is correct, but when the mouse cursor exceeds the original window
size then all mouse events are lost.
It is just not efficient to have to reload EVERYTHING under windows, just
because the mouse setting are wrong. Doing the opposite would be more
optimal.
Ive never looked at the gears example, but it should be effected like
any other sdl gl app. Im pretty sure that it always kills it for
consistancy sake. If Im wrong, I think Sam would have mentioned
otherwise by now
So, yes, SDL apps are supposed to always assume the opengl context was
destroyed after a setvideo, no matter what the OS can actually do.
Remember, its not hard to just destroy the opengl context and remake it
to resize, its just inefficient on platforms that can resize the current
context’s window.
SDL is killing the context on all platforms to make all platforms act
just like it does on Windows. Because of this, all SDL apps, no matter
what platform they were originally developed on and tested on,
automatically assume everything was blown away. You cannot change the
SDL API if it breaks these older apps. Period. Thats why I suggested
what I did.
hmm… so now i’m confused. are you sure sdl kills the context for all
OS’s? the gears program revived this issue because it didn’t expect
the context to be destroyed, right? when i originally brought this
issue up a while ago, i was told that different OS’s dealt with it
differently so i should expect that the opengl context might not be
okay after a setvideo. doing a quick search seems to back this up, but
i’m only on windows at the moment, so i don’t have first hand evidence
of this.
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
–
Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids,
we’d all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." – Kristian Wilson, Nintendo,
Inc, 1989
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Michel Nolard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAwEbQyAKwOMHoSb0RAkOvAKDFPBguawz6pJMqUG/ZKDGL+HN4eACaAq25
9kXzS/R7vmHzzscOPibeNUY=
=e+Vp
-----END PGP SIGNATURE-----> On Fri, 4 Jun 2004, Patrick McFarland wrote:
On 03-Jun-2004, Miles Vignol wrote:
From: “Patrick McFarland”