glSDL question

Hi all!

I have a little question to you (David Olofson or Stephane Marchesin).

What happend with glSDL if I’m running on Windows machine and I do a
CTRL+TAB? Do I lost the surfaces? How can I to reload them?

I think that glSDL holds a surface copy on system memory…so maybe it is not
necessary, the issue is that right now, I have a test running with glSDL but
when I do a CTRL+TAB and after that…I return back to my test program… I
have a screen corruption and even, the system doesn’t responding anymore,
only to ESC key and this one…close my program without any errors.

I’m using glSDL 0.7, I’m not using the last glSDL patch included on SDL
(http://icps.u-strasbg.fr/~marchesin/sdl/glsdl-final.patch),
could be this issue solved on that patch?

thanks you very much

Roberto

Roberto Prieto a ?crit :

Hi all!

I have a little question to you (David Olofson or Stephane Marchesin).

What happend with glSDL if I’m running on Windows machine and I do a
CTRL+TAB? Do I lost the surfaces?

Surfaces shouldn’t be lost. I think it’s something else, like a context
not properly restored.
But then, you should have the same issue with every SDL/OpenGL
application since glSDL just uses SDL’s OpenGL interface to do its stuff.

How can I to reload them?

I think that glSDL holds a surface copy on system memory…so maybe it
is not necessary, the issue is that right now, I have a test running
with glSDL but when I do a CTRL+TAB and after that…I return back to
my test program… I have a screen corruption and even, the system
doesn’t responding anymore, only to ESC key and this one…close my
program without any errors.

I’m using glSDL 0.7, I’m not using the last glSDL patch included on SDL

So you are using glSDL/wrapper right now ?
Would you mind trying with the patch version ? The two versions have
enough differences that they might not have the same bugs :slight_smile:

(http://icps.u-strasbg.fr/~marchesin/sdl/glsdl-final.patch),
could be this issue solved on that patch?

Maybe, it would be nice if you could try the patch, or if you had a
sample program with source code that could reproduce your problem.

Anyway, thanks for the feedback. I’ll try to see if I can reproduce this
issue.

Stephane

Yes, I can test it!!
indeed, right now, Im using it. By the way, Im using Visual Studio Net.2003.
To compile sdl I had to put ENABLE_GLSDL on compiler definitions and after
that, I was in trouble(little to be exact :slight_smile: ), I had to replace this two
lines of glSDL_LockHWSurface
//— void *upper = OpenGL_Surface->pixels + OpenGL_Surface->pitch * y;
//— void *lower = OpenGL_Surface->pixels + OpenGL_Surface->pitch *
(OpenGL_Surface->h - y - 1);

with:

Uint32 *upper = (Uint32)OpenGL_Surface->pixels + OpenGL_Surface->pitch * y;

Uint32 *lower = (Uint32)OpenGL_Surface->pixels + OpenGL_Surface->pitch *
(OpenGL_Surface->h - y - 1);

because of I got an error messages of “unknown size of void” or something
like that.
Now, Im trying to use the same program as I noticed that bugs(CTRL+TAB), as
soon as possible, I will reply you again.
Right now, only one questions…what is glscale??? I think is a kind of
surface scaling using opengl, it isnt?
and…other questions(the last one :slight_smile: ), do you have working on glSDL? when
we could get a fresh revision?
thanks you very much!
Roberto> ----- Original Message -----

From: stephane.marchesin@wanadoo.fr (Stephane Marchesin)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, July 18, 2005 12:35 PM
Subject: Re: [SDL] glSDL question

Roberto Prieto a ?crit :

Hi all!

I have a little question to you (David Olofson or Stephane Marchesin).

What happend with glSDL if I’m running on Windows machine and I do a
CTRL+TAB? Do I lost the surfaces?

Surfaces shouldn’t be lost. I think it’s something else, like a context
not properly restored.
But then, you should have the same issue with every SDL/OpenGL
application since glSDL just uses SDL’s OpenGL interface to do its stuff.

How can I to reload them?

I think that glSDL holds a surface copy on system memory…so maybe it is
not necessary, the issue is that right now, I have a test running with
glSDL but when I do a CTRL+TAB and after that…I return back to my test
program… I have a screen corruption and even, the system doesn’t
responding anymore, only to ESC key and this one…close my program
without any errors.

I’m using glSDL 0.7, I’m not using the last glSDL patch included on SDL

So you are using glSDL/wrapper right now ?
Would you mind trying with the patch version ? The two versions have
enough differences that they might not have the same bugs :slight_smile:

(http://icps.u-strasbg.fr/~marchesin/sdl/glsdl-final.patch),
could be this issue solved on that patch?

Maybe, it would be nice if you could try the patch, or if you had a
sample program with source code that could reproduce your problem.

Anyway, thanks for the feedback. I’ll try to see if I can reproduce this
issue.

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Roberto Prieto a ?crit :

Yes, I can test it!!
indeed, right now, Im using it. By the way, Im using Visual Studio
Net.2003. To compile sdl I had to put ENABLE_GLSDL on compiler
definitions and after that, I was in trouble(little to be exact :slight_smile: ),
I had to replace this two lines of glSDL_LockHWSurface
//— void *upper = OpenGL_Surface->pixels + OpenGL_Surface->pitch * y;
//— void *lower = OpenGL_Surface->pixels + OpenGL_Surface->pitch *
(OpenGL_Surface->h - y - 1);

with:

Uint32 *upper = (Uint32)OpenGL_Surface->pixels + OpenGL_Surface->pitch

  • y;

Uint32 *lower = (Uint32)OpenGL_Surface->pixels + OpenGL_Surface->pitch

  • (OpenGL_Surface->h - y - 1);

because of I got an error messages of “unknown size of void” or
something like that.

I’ll add a fix for this. Also, note that your change will break on 64
bit platforms.

Now, Im trying to use the same program as I noticed that
bugs(CTRL+TAB), as soon as possible, I will reply you again.
Right now, only one questions…what is glscale??? I think is a kind of
surface scaling using opengl, it isnt?

Yes. It’s something totally different from glSDL. It’s another SDL
backend that takes an arbitrary SDL application and scales the window
using OpenGL filtering (like Mame and other emulators do), which is
especially useful to play fixed resolution games on big screens.

and…other questions(the last one :slight_smile: ), do you have working on glSDL?

The latest version is the one that is online. I’m awaiting feedback and
bugreports :slight_smile:

Stephane

Stephane,
I’m testing sdl1.2 experimental, right now I have this benchmark, basically,
is testsprite.c of SDL with support to glSDL, I was using 1000 big sprites
with colorkey, I know that there is a lot of overload because of…there are
1000 sprites and each of them is a different surface! but I would like to
test it on a very hard scenery:

I:\Temp Development\HX OpenGL
Test\SDL12.experimental\test>sprite1000 -hw -bpp 32 -width 800 -height
600 -fullscreen
glSDL videoinit
Fullscreen (with flickering)
Screen is at 32 bits per pixel
Screen is in video memory
Sprite is in video memory
291.81 frames per second

I:\Temp Development\HX OpenGL
Test\SDL12.experimental\test>sprite1000 -hw -bpp 32 -width 800 -height
600 -flip
glSDL videoinit
Windowed (without flickering but with red bar doing a zig-zag!)
Screen is at 32 bits per pixel
Screen is in video memory
Screen has double-buffering enabled
Sprite is in video memory
254.68 frames per second

I:\Temp Development\HX OpenGL
Test\SDL12.experimental\test>sprite1000 -hw -bpp 32 -width 800 -height 600
glSDL videoinit
Windowed
Screen is at 32 bits per pixel
Screen is in video memory
Sprite is in video memory
186.21 frames per second

I have to test with fullscreen+hardware+flip but I think it will be close to
300fps. My PC is an AthlonXP 3000+ with 1Gb DDR400 and Ati 9700Pro(down
clocked to 9700 due to summer temperatures! :slight_smile: ).

I have a problem, if I dont set flip(to force SDL_DOUBLEBUF), of course, I
get a lot of flickering! but if I set flip… I get a horribly vertical red
bar doing a zig-zag from right to left and right… It seems to be related
with screen refresh.

In respect of the previous problem(CTRL+TAB)… maybe is a problem with my
old application, if I test this using “sprite1000.exe” everything works
fine! but with my old application, I get a “frezee” using glSDL 0.71 and
SDL12Exp, but the behaviour is quite strange to became crazy… when I
return to the application with another CTRL+TAB, everything is freeze but…
if I do again a CTRL+TAB (press and hold down to show windows
applications)…the whole application return to live! so now, I only have to
press ESC key to abort the new CTRL+TAB. I know, its sound very
strange…but indeed, it?s hapened on my machine.

About these two problems…I would like to test it on more machines…so
stay tuned :slight_smile:

Well, right now…this was all!!

Cheers!
Roberto> ----- Original Message -----

From: stephane.marchesin@wanadoo.fr (Stephane Marchesin)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, July 19, 2005 12:31 PM
Subject: Re: [SDL] glSDL question

Roberto Prieto a ?crit :

Yes, I can test it!!
indeed, right now, Im using it. By the way, Im using Visual Studio
Net.2003. To compile sdl I had to put ENABLE_GLSDL on compiler definitions
and after that, I was in trouble(little to be exact :slight_smile: ), I had to replace
this two lines of glSDL_LockHWSurface
//— void *upper = OpenGL_Surface->pixels + OpenGL_Surface->pitch * y;
//— void *lower = OpenGL_Surface->pixels + OpenGL_Surface->pitch *
(OpenGL_Surface->h - y - 1);

with:

Uint32 *upper = (Uint32)OpenGL_Surface->pixels + OpenGL_Surface->pitch *
y;

Uint32 *lower = (Uint32)OpenGL_Surface->pixels + OpenGL_Surface->pitch *
(OpenGL_Surface->h - y - 1);

because of I got an error messages of “unknown size of void” or something
like that.

I’ll add a fix for this. Also, note that your change will break on 64
bit platforms.

Now, Im trying to use the same program as I noticed that bugs(CTRL+TAB),
as soon as possible, I will reply you again.
Right now, only one questions…what is glscale??? I think is a kind of
surface scaling using opengl, it isnt?

Yes. It’s something totally different from glSDL. It’s another SDL
backend that takes an arbitrary SDL application and scales the window
using OpenGL filtering (like Mame and other emulators do), which is
especially useful to play fixed resolution games on big screens.

and…other questions(the last one :slight_smile: ), do you have working on glSDL?

The latest version is the one that is online. I’m awaiting feedback and
bugreports :slight_smile:

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Roberto Prieto a ?crit :

Stephane,
I’m testing sdl1.2 experimental, right now I have this benchmark,
basically, is testsprite.c of SDL with support to glSDL, I was using
1000 big sprites with colorkey, I know that there is a lot of overload
because of…there are 1000 sprites and each of them is a different
surface! but I would like to test it on a very hard scenery:

I:\Temp Development\HX OpenGL Test\SDL12.experimental\test>sprite1000
-hw -bpp 32 -width 800 -height 600 -fullscreen
glSDL videoinit
Fullscreen (with flickering)
Screen is at 32 bits per pixel
Screen is in video memory
Sprite is in video memory
291.81 frames per second

I:\Temp Development\HX OpenGL Test\SDL12.experimental\test>sprite1000
-hw -bpp 32 -width 800 -height 600 -flip
glSDL videoinit
Windowed (without flickering but with red bar doing a zig-zag!)
Screen is at 32 bits per pixel
Screen is in video memory
Screen has double-buffering enabled
Sprite is in video memory
254.68 frames per second

I:\Temp Development\HX OpenGL Test\SDL12.experimental\test>sprite1000
-hw -bpp 32 -width 800 -height 600
glSDL videoinit
Windowed
Screen is at 32 bits per pixel
Screen is in video memory
Sprite is in video memory
186.21 frames per second

I have to test with fullscreen+hardware+flip but I think it will be
close to 300fps. My PC is an AthlonXP 3000+ with 1Gb DDR400 and Ati
9700Pro(down clocked to 9700 due to summer temperatures! :slight_smile: ).

I have a problem, if I dont set flip(to force SDL_DOUBLEBUF), of
course, I get a lot of flickering! but if I set flip… I get a
horribly vertical red bar doing a zig-zag from right to left and
right… It seems to be related with screen refresh.

Well, that bar is actually drawn by the testsprite code :slight_smile:
Look at the testsprite.c code, between the DEBUG_FLIP sections.

In respect of the previous problem(CTRL+TAB)… maybe is a problem
with my old application, if I test this using "sprite1000.exe"
everything works fine! but with my old application, I get a "frezee"
using glSDL 0.71 and SDL12Exp, but the behaviour is quite strange to
became crazy… when I return to the application with another
CTRL+TAB, everything is freeze but… if I do again a CTRL+TAB (press
and hold down to show windows applications)…the whole application
return to live! so now, I only have to press ESC key to abort the new
CTRL+TAB. I know, its sound very strange…but indeed, it?s hapened
on my machine.

Well, if you can reduce this with a simple test case, we might be able
to find the cause.

Stephane

Hahahaha :slight_smile:
I didn’t see it!!! so you were right! there is a code that render thats red
bar :).

I’m going to prepare a little program with the ctrl+tab but I think that
this problem is not related to glSDL.
As I said before, I?ll send you more benchmark on different machines.

I like the current state so I’m going to include it with my library
(CRM32Pro) and I?ll do a lot of internal testing so if
I find any bug, I?ll send you an email.

one question… Is SDL12Exp based on latest SDL 1.2.8? I think so but I
would like to be sure of it.

thanks you very much :slight_smile:
see you later!

Roberto> ----- Original Message -----

From: stephane.marchesin@wanadoo.fr (Stephane Marchesin)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, July 19, 2005 11:05 PM
Subject: Re: [SDL] glSDL question

Roberto Prieto a ?crit :

Stephane,
I’m testing sdl1.2 experimental, right now I have this benchmark,
basically, is testsprite.c of SDL with support to glSDL, I was using 1000
big sprites with colorkey, I know that there is a lot of overload because
of…there are 1000 sprites and each of them is a different surface! but I
would like to test it on a very hard scenery:

I:\Temp Development\HX OpenGL
Test\SDL12.experimental\test>sprite1000 -hw -bpp 32 -width 800 -height
600 -fullscreen
glSDL videoinit
Fullscreen (with flickering)
Screen is at 32 bits per pixel
Screen is in video memory
Sprite is in video memory
291.81 frames per second

I:\Temp Development\HX OpenGL
Test\SDL12.experimental\test>sprite1000 -hw -bpp 32 -width 800 -height
600 -flip
glSDL videoinit
Windowed (without flickering but with red bar doing a zig-zag!)
Screen is at 32 bits per pixel
Screen is in video memory
Screen has double-buffering enabled
Sprite is in video memory
254.68 frames per second

I:\Temp Development\HX OpenGL
Test\SDL12.experimental\test>sprite1000 -hw -bpp 32 -width 800 -height 600
glSDL videoinit
Windowed
Screen is at 32 bits per pixel
Screen is in video memory
Sprite is in video memory
186.21 frames per second

I have to test with fullscreen+hardware+flip but I think it will be close
to 300fps. My PC is an AthlonXP 3000+ with 1Gb DDR400 and Ati 9700Pro(down
clocked to 9700 due to summer temperatures! :slight_smile: ).

I have a problem, if I dont set flip(to force SDL_DOUBLEBUF), of course, I
get a lot of flickering! but if I set flip… I get a horribly vertical
red bar doing a zig-zag from right to left and right… It seems to be
related with screen refresh.

Well, that bar is actually drawn by the testsprite code :slight_smile:
Look at the testsprite.c code, between the DEBUG_FLIP sections.

In respect of the previous problem(CTRL+TAB)… maybe is a problem with my
old application, if I test this using “sprite1000.exe” everything works
fine! but with my old application, I get a “frezee” using glSDL 0.71 and
SDL12Exp, but the behaviour is quite strange to became crazy… when I
return to the application with another CTRL+TAB, everything is freeze
but… if I do again a CTRL+TAB (press and hold down to show windows
applications)…the whole application return to live! so now, I only have
to press ESC key to abort the new CTRL+TAB. I know, its sound very
strange…but indeed, it?s hapened on my machine.

Well, if you can reduce this with a simple test case, we might be able
to find the cause.

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Roberto Prieto a ?crit :

Hahahaha :slight_smile:
I didn’t see it!!! so you were right! there is a code that render
thats red bar :).

I’m going to prepare a little program with the ctrl+tab but I think
that this problem is not related to glSDL.
As I said before, I?ll send you more benchmark on different machines.

I like the current state so I’m going to include it with my library
(CRM32Pro) and I?ll do a lot of internal testing so if
I find any bug, I?ll send you an email.

one question… Is SDL12Exp based on latest SDL 1.2.8? I think so but
I would like to be sure of it.

Is it based on a CVS version of SDL 1.2.9.

Stephane

Hi Stephane!

Today, I did a lot of testing using SDL12Exp but I will do a lot of more
testing… My idea is… to test it on a lot of different systems. At my
work I have 4-5 differents environment but I will use my friend’s computer
too.

Right now, I didnt find any bug so it seems that glSDL backend is quite
stable :).

About my old problem with CTRL+TAB, I have discovered that it only occurs
with ATI driver… on a i845G video integrated machine everything works
fine. I will try the latest Catalyst drivers, maybe it could fix it, do you
have any suggestion about it?

Thanks you.

Roberto> ----- Original Message -----

From: stephane.marchesin@wanadoo.fr (Stephane Marchesin)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Thursday, July 21, 2005 11:32 AM
Subject: Re: [SDL] glSDL question

Roberto Prieto a ?crit :

Hahahaha :slight_smile:
I didn’t see it!!! so you were right! there is a code that render thats
red bar :).

I’m going to prepare a little program with the ctrl+tab but I think that
this problem is not related to glSDL.
As I said before, I?ll send you more benchmark on different machines.

I like the current state so I’m going to include it with my library
(CRM32Pro) and I?ll do a lot of internal testing so if
I find any bug, I?ll send you an email.

one question… Is SDL12Exp based on latest SDL 1.2.8? I think so but I
would like to be sure of it.

Is it based on a CVS version of SDL 1.2.9.

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi again!

I have just uploaded a benchmark using SDL 1.2Exp.

Any of you can download it and test it. If you find any bugs or problem,
please report to this thread.
About fps test, if you want, you can send me an email with your results. I
will post it on my web site on coming days.

http://www.megastormsystems.com/download/glSDL-Bench.rar

Thanks you!
Roberto> ----- Original Message -----

From: dm2@mi.madritel.es (Roberto Prieto)
To: "A list for developers using the SDL library. (includesSDL-announce)"

Sent: Thursday, July 21, 2005 11:12 PM
Subject: Re: [SDL] glSDL question

Hi Stephane!

Today, I did a lot of testing using SDL12Exp but I will do a lot of more
testing… My idea is… to test it on a lot of different systems. At my
work I have 4-5 differents environment but I will use my friend’s computer
too.

Right now, I didnt find any bug so it seems that glSDL backend is quite
stable :).

About my old problem with CTRL+TAB, I have discovered that it only occurs
with ATI driver… on a i845G video integrated machine everything works
fine. I will try the latest Catalyst drivers, maybe it could fix it, do
you have any suggestion about it?

Thanks you.

Roberto

----- Original Message -----
From: “Stephane Marchesin” <stephane.marchesin at wanadoo.fr>
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Thursday, July 21, 2005 11:32 AM
Subject: Re: [SDL] glSDL question

Roberto Prieto a ?crit :

Hahahaha :slight_smile:
I didn’t see it!!! so you were right! there is a code that render thats
red bar :).

I’m going to prepare a little program with the ctrl+tab but I think that
this problem is not related to glSDL.
As I said before, I?ll send you more benchmark on different machines.

I like the current state so I’m going to include it with my library
(CRM32Pro) and I?ll do a lot of internal testing so if
I find any bug, I?ll send you an email.

one question… Is SDL12Exp based on latest SDL 1.2.8? I think so but I
would like to be sure of it.

Is it based on a CVS version of SDL 1.2.9.

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl