SDL 1.3 first test

Hello all,

I’ve compiled the latest SDL 1.3 trunk.
I simply recompiled my lib SDLayer (multiple planes/layers management and refresh system) with SDL 1.3
The demo “snow” is damn slow (not snow, slow :)) compared with SDL 1.2.
I’m aware that it’s just a quick test, I changed NOTHING in my source code just to see
what’d happen to my beautiful demo.

To measure this difference, here is the max number of sprites drawn and the FPS:

1.2:? 294 sprites, 232 FPS (Dirty rectangles method)
??? 276 sprites, 39?? FPS (Flip method)

1.3: 60 sprites, 5 FPS (both methods)

Fullscreen changes nothing on my platform, and even, SDL 1.3 doesn’t switch the screen resolution but rather opens a window without a decoration instead.

Any advices are welcome. If the topic is too long and I need simply to consider reading the doc of 1.3, don’t waste your energy for it !

Julien

Ouch that is a hell of a performance degradation. I am steering well clear of 1.3 until all these kind of issues are resolved!

I will eventually port my SDL 1.2 games over to 1.3 but with these kind of frame rates I won’t bother!!

Ed________________________________
From: clementj2005@yahoo.fr (Julien Clement)
To: SDL
Sent: Tuesday, 26 May, 2009 10:50:45
Subject: [SDL] SDL 1.3 first test

Hello all,

I’ve compiled the latest SDL 1.3 trunk.
I simply recompiled my lib SDLayer (multiple planes/layers management and refresh system) with SDL 1.3
The demo “snow” is damn slow (not snow, slow :)) compared with SDL 1.2.
I’m aware that it’s just a quick test, I changed NOTHING in my source code just to see
what’d happen to my beautiful demo.

To measure this difference, here is the max number of sprites drawn and the FPS:

1.2: 294 sprites, 232 FPS (Dirty rectangles method)
276 sprites, 39 FPS (Flip method)

1.3: 60 sprites, 5 FPS (both methods)

Fullscreen changes nothing on my platform, and even, SDL 1.3 doesn’t switch the screen resolution but rather opens a window without a decoration instead.

Any advices are welcome. If the topic is too long and I need simply to consider reading the doc of 1.3, don’t waste your energy for it !

Julien

I assume you use Linux? X support for full screen isn’t complete yet. That will be fixed eventually.

As for the performance, maybe something is missing? Possibly OpenGL support?

Try the applications in the test directory. You can see if OpenGL works, get framerates for the test apps, etc.

I know the way things worked in 1.2 is no longer the fast way in 1.3. You might want to look at the source for the test apps, and update it accordingly.________________________________
From: clementj2005@yahoo.fr (Julien Clement)
To: SDL
Sent: Tuesday, May 26, 2009 5:50:45 AM
Subject: [SDL] SDL 1.3 first test

Hello all,

I’ve compiled the latest SDL 1.3 trunk.
I simply recompiled my lib SDLayer (multiple planes/layers management and refresh system) with SDL 1.3
The demo “snow” is damn slow (not snow, slow :)) compared with SDL 1.2.
I’m aware that it’s just a quick test, I changed NOTHING in my source code just to see
what’d happen to my beautiful demo.

To measure this difference, here is the max number of sprites drawn and the FPS:

1.2: 294 sprites, 232 FPS (Dirty rectangles method)
276 sprites, 39 FPS (Flip method)

1.3: 60 sprites, 5 FPS (both methods)

Fullscreen changes nothing on my platform, and even, SDL 1.3 doesn’t switch the screen resolution but rather opens a window without a decoration instead.

Any advices are welcome. If the topic is too long and I need simply to consider reading the doc of 1.3, don’t waste your energy for it !

Julien

I know the way things worked in 1.2 is no longer the fast way in 1.3. You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:


http://pphaneuf.livejournal.com/

Yes, I have direct rendering activated, glxgears is fast (more than 9000 FPS).
I run Linux.

— En date de?: Mar 26.5.09, Pierre Phaneuf a ?crit?:de: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: “A list for developers using the SDL library. (includes SDL-announce)”
Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3. You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Seriously, 5 fps? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck? Is it when you swap buffers?

Jonny DOn Tue, May 26, 2009 at 10:14 AM, julien CLEMENT wrote:

Yes, I have direct rendering activated, glxgears is fast (more than 9000
FPS).
I run Linux.

— En date de?: Mar 26.5.09, Pierre Phaneuf a ?crit?:

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3. You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de?: Mar 26.5.09, Jonathan Dearborn a ?crit?:de: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: “A list for developers using the SDL library. (includes SDL-announce)”
Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps?? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck?? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT <@Julien_Clement1> wrote:

Yes, I have direct rendering activated, glxgears is fast (more than 9000
FPS).
I run Linux.

— En date de?: Mar 26.5.09, Pierre Phaneuf a ?crit?:

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3. You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Did you check the test applications?

SDL may be compiled without OpenGL support.________________________________
From: clementj2005@yahoo.fr (Julien Clement)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Tuesday, May 26, 2009 10:33:42 AM
Subject: Re: [SDL] SDL 1.3 first test

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de : Mar 26.5.09, Jonathan Dearborn a ?crit :

De: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: “A list for developers using the SDL library. (includes SDL-announce)”
Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT wrote:

Yes, I have direct rendering activated, glxgears is fast (more than 9000
FPS).
I run Linux.

— En date de : Mar 26.5.09, Pierre Phaneuf a ?crit :

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski <@Patryk_Bratkowski> wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3. You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

yes I did, it is all perfect, the FPS is high and the animations are fluid.

— En date de?: Mar 26.5.09, Patryk Bratkowski a ?crit?:de: Patryk Bratkowski
Objet: Re: [SDL] SDL 1.3 first test
?: “A list for developers using the SDL library. (includes SDL-announce)”
Date: Mardi 26 Mai 2009, 16h47

Did you check the test applications?

SDL may be compiled without OpenGL support.

From: @Julien_Clement1 (Julien Clement)
To: A list for developers using the SDL library. (includes SDL-announce)
Sent: Tuesday, May 26, 2009 10:33:42 AM
Subject: Re: [SDL] SDL 1.3 first test

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de?: Mar 26.5.09, Jonathan Dearborn a ?crit?:

De: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: “A list for developers using the SDL library. (includes SDL-announce)”
Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps?? You don’t even need to measure that to tell that
there’s a problem :wink:
Can
you identify the bottleneck?? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT <@Julien_Clement1> wrote:

Yes, I have direct rendering activated, glxgears is fast (more than 9000
FPS).
I run Linux.

— En date de?: Mar 26.5.09, Pierre Phaneuf a ?crit?:

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer
the fast way in 1.3. You

might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all
the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL
mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-----La pi?ce jointe associ?e suit-----


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

half of the test apps that come with SDL 1.3 source wont even run Mac.On Tue, May 26, 2009 at 7:47 AM, Patryk Bratkowski wrote:

Did you check the test applications?

SDL may be compiled without OpenGL support.


From: julien CLEMENT
To: A list for developers using the SDL library. (includes SDL-announce)

Sent: Tuesday, May 26, 2009 10:33:42 AM
Subject: Re: [SDL] SDL 1.3 first test

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de?: Mar 26.5.09, Jonathan Dearborn a
?crit?:

De: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes SDL-announce)"

Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps?? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck?? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT wrote:

Yes, I have direct rendering activated, glxgears is fast (more than 9000
FPS).
I run Linux.

— En date de?: Mar 26.5.09, Pierre Phaneuf a
?crit?:

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3. You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That’s odd, because I’m developing on the Mac and I just tested them
yesterday.

What test are you having problems with?

See ya,
–SamOn Tue, May 26, 2009 at 8:09 AM, Pavel Dudrenov wrote:

half of the test apps that come with SDL 1.3 source wont even run Mac.

On Tue, May 26, 2009 at 7:47 AM, Patryk Bratkowski wrote:

Did you check the test applications?

SDL may be compiled without OpenGL support.


From: julien CLEMENT
To: A list for developers using the SDL library. (includes SDL-announce)

Sent: Tuesday, May 26, 2009 10:33:42 AM
Subject: Re: [SDL] SDL 1.3 first test

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de : Mar 26.5.09, Jonathan Dearborn a
?crit :

De: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes SDL-announce)"

Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT wrote:

Yes, I have direct rendering activated, glxgears is fast (more than 9000
FPS).
I run Linux.

— En date de : Mar 26.5.09, Pierre Phaneuf a
?crit :

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: “A list for developers using the SDL library. (includes
SDL-announce)”

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3.
You

might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello all,

I’ve compiled the latest SDL 1.3 trunk.
I simply recompiled my lib SDLayer (multiple planes/layers management and
refresh system) with SDL 1.3 The demo “snow” is damn slow (not snow, slow
:)) compared with SDL 1.2. I’m aware that it’s just a quick test, I changed
NOTHING in my source code just to see what’d happen to my beautiful demo.

To measure this difference, here is the max number of sprites drawn and the
FPS:

1.2: 294 sprites, 232 FPS (Dirty rectangles method)
276 sprites, 39 FPS (Flip method)

1.3: 60 sprites, 5 FPS (both methods)

The compatibility layer will lead to this. As even if it is suposed to be as
quick as old 1.2 way in special cases it can’t do that.

Especially as your layer system is not designed on top of the SDL 1.3
features.
Well all this is true if your layer API does what I think it does.
Don’t remember that much from the posts from it to this ML.

The problem I think is in the way that the compatibility layer supports
surface to surface blits when the target surface is not the screen surface.

For pure SDL 1.3 you want to draw static textures (static 1.2 surfaces) to
window(s) (screen surface in 1.2) and you can do lots of “blits” per frame
with frame rates over 1000 FPS. Ie don’t combine in separate surface but
directly to the window. Here the blend modes are really handy.

Fullscreen changes nothing on my platform, and even, SDL 1.3 doesn’t switch
the screen resolution but rather opens a window without a decoration
instead.

Screen resizing is disabled at the moment!
see the patch from
http://bugzilla.libsdl.org/show_bug.cgi?id=702
for XRANDR resizing. As anyone can see from that “huge” patch this is
deliberate action to disable those mode changes.

Sam!
PS. There are some 1.3 type examples that doesn’t clean the stuff at exit as
they should. I have been too busy to make the patches.

PS. Bugzilla still doesn’t work without the constant relogin. I think it was
bug 703.On Tuesday 26 May 2009 12:50:45 julien CLEMENT wrote:

Any advices are welcome. If the topic is too long and I need simply to
consider reading the doc of 1.3, don’t waste your energy for it !

Julien

Hello all,

I have recently adapted my game (flobopuyo) to provide native SDL 1.3
support, and the performances I get are an order of magnitude better
than with SDL 1.2 on X11.

On SDL 1.2:
about 100 FPS, my game has 30% CPU load and X11 has 40%

On SDL 1.3:
60 FPS (synchronized on the screen refresh rate), my game has 5% CPU
load and X11 has none.

I use the OpenGL engine, and all the graphic work is essentially
SDL_Textures blitted onto the screen, so all the hard work is
offloaded to the GPU.

I have a question concerning the video engines on SDL 1.3:
On X11, the default engine seems to be X11 (and not OpenGL).
Currently, this engine doesn’t support alpha blending and stretching.
Is it because the engine is not yet complete, or will we see engines
without such crucial features as alpha blending in the final SDL 1.3
release?
If this is the case, I guess a game will have to implement different
rendering paths depending on the available engines:

  • one “slow” path to render pretty much everything on a software
    SDL_Surface before copying it to the screen a la SDL 1.2 for the less
    featured engines,
  • one “fast” path where most things are loaded in SDL_Textures and
    blit on the screen for the more capable engines

Writing a game with correct support of such differences in the video
engines will be a bit more difficult as it was for SDL 1.2, won’t it?

Florent

Le 27 mai 09 ? 00:28, Sami N??t?nen a ?crit :> On Tuesday 26 May 2009 12:50:45 julien CLEMENT wrote:

Hello all,

I’ve compiled the latest SDL 1.3 trunk.
I simply recompiled my lib SDLayer (multiple planes/layers
management and
refresh system) with SDL 1.3 The demo “snow” is damn slow (not
snow, slow
:)) compared with SDL 1.2. I’m aware that it’s just a quick test, I
changed
NOTHING in my source code just to see what’d happen to my beautiful
demo.

To measure this difference, here is the max number of sprites drawn
and the
FPS:

1.2: 294 sprites, 232 FPS (Dirty rectangles method)
276 sprites, 39 FPS (Flip method)

1.3: 60 sprites, 5 FPS (both methods)

The compatibility layer will lead to this. As even if it is suposed
to be as
quick as old 1.2 way in special cases it can’t do that.

Especially as your layer system is not designed on top of the SDL 1.3
features.
Well all this is true if your layer API does what I think it does.
Don’t remember that much from the posts from it to this ML.

The problem I think is in the way that the compatibility layer
supports
surface to surface blits when the target surface is not the screen
surface.

For pure SDL 1.3 you want to draw static textures (static 1.2
surfaces) to
window(s) (screen surface in 1.2) and you can do lots of “blits” per
frame
with frame rates over 1000 FPS. Ie don’t combine in separate surface
but
directly to the window. Here the blend modes are really handy.

Fullscreen changes nothing on my platform, and even, SDL 1.3
doesn’t switch
the screen resolution but rather opens a window without a decoration
instead.

Screen resizing is disabled at the moment!
see the patch from
http://bugzilla.libsdl.org/show_bug.cgi?id=702
for XRANDR resizing. As anyone can see from that “huge” patch this is
deliberate action to disable those mode changes.

Sam!
PS. There are some 1.3 type examples that doesn’t clean the stuff at
exit as
they should. I have been too busy to make the patches.

PS. Bugzilla still doesn’t work without the constant relogin. I
think it was
bug 703.

Any advices are welcome. If the topic is too long and I need simply
to
consider reading the doc of 1.3, don’t waste your energy for it !

Julien


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

The software renderer is intended to be the slow, fully featured fallback if
the system renderer isn’t fast enough.

The X11 renderer isn’t complete, I want to add XRender support to it,
although that’s not trivial.

See ya!
–SamOn Tue, May 26, 2009 at 5:27 PM, Florent GMail (imap) wrote:

Hello all,

I have recently adapted my game (flobopuyo) to provide native SDL 1.3
support, and the performances I get are an order of magnitude better than
with SDL 1.2 on X11.

On SDL 1.2:
about 100 FPS, my game has 30% CPU load and X11 has 40%

On SDL 1.3:
60 FPS (synchronized on the screen refresh rate), my game has 5% CPU load
and X11 has none.

I use the OpenGL engine, and all the graphic work is essentially
SDL_Textures blitted onto the screen, so all the hard work is offloaded to
the GPU.

I have a question concerning the video engines on SDL 1.3:
On X11, the default engine seems to be X11 (and not OpenGL). Currently,
this engine doesn’t support alpha blending and stretching. Is it because the
engine is not yet complete, or will we see engines without such crucial
features as alpha blending in the final SDL 1.3 release?
If this is the case, I guess a game will have to implement different
rendering paths depending on the available engines:

  • one “slow” path to render pretty much everything on a software
    SDL_Surface before copying it to the screen a la SDL 1.2 for the less
    featured engines,
  • one “fast” path where most things are loaded in SDL_Textures and blit on
    the screen for the more capable engines

Writing a game with correct support of such differences in the video
engines will be a bit more difficult as it was for SDL 1.2, won’t it?

Florent

Le 27 mai 09 ? 00:28, Sami N??t?nen a ?crit :

On Tuesday 26 May 2009 12:50:45 julien CLEMENT wrote:

Hello all,

I’ve compiled the latest SDL 1.3 trunk.
I simply recompiled my lib SDLayer (multiple planes/layers management and
refresh system) with SDL 1.3 The demo “snow” is damn slow (not snow, slow
:)) compared with SDL 1.2. I’m aware that it’s just a quick test, I
changed
NOTHING in my source code just to see what’d happen to my beautiful demo.

To measure this difference, here is the max number of sprites drawn and
the
FPS:

1.2: 294 sprites, 232 FPS (Dirty rectangles method)
276 sprites, 39 FPS (Flip method)

1.3: 60 sprites, 5 FPS (both methods)

The compatibility layer will lead to this. As even if it is suposed to be
as
quick as old 1.2 way in special cases it can’t do that.

Especially as your layer system is not designed on top of the SDL 1.3
features.
Well all this is true if your layer API does what I think it does.
Don’t remember that much from the posts from it to this ML.

The problem I think is in the way that the compatibility layer supports
surface to surface blits when the target surface is not the screen
surface.

For pure SDL 1.3 you want to draw static textures (static 1.2 surfaces) to
window(s) (screen surface in 1.2) and you can do lots of “blits” per frame
with frame rates over 1000 FPS. Ie don’t combine in separate surface but
directly to the window. Here the blend modes are really handy.

Fullscreen changes nothing on my platform, and even, SDL 1.3 doesn’t

switch
the screen resolution but rather opens a window without a decoration
instead.

Screen resizing is disabled at the moment!
see the patch from
http://bugzilla.libsdl.org/show_bug.cgi?id=702
for XRANDR resizing. As anyone can see from that “huge” patch this is
deliberate action to disable those mode changes.

Sam!
PS. There are some 1.3 type examples that doesn’t clean the stuff at exit
as
they should. I have been too busy to make the patches.

PS. Bugzilla still doesn’t work without the constant relogin. I think it
was
bug 703.

Any advices are welcome. If the topic is too long and I need simply to

consider reading the doc of 1.3, don’t waste your energy for it !

Julien


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I have to admit that I tested that a few months ago. I’ll checkout the
code again and try it again.
PavelOn Tue, May 26, 2009 at 2:31 PM, Sam Lantinga wrote:

That’s odd, because I’m developing on the Mac and I just tested them
yesterday.

What test are you having problems with?

See ya,
–Sam

On Tue, May 26, 2009 at 8:09 AM, Pavel Dudrenov <@Pavel_Dudrenov> wrote:

half of the test apps that come with SDL 1.3 source wont even run Mac.

On Tue, May 26, 2009 at 7:47 AM, Patryk Bratkowski wrote:

Did you check the test applications?

SDL may be compiled without OpenGL support.


From: julien CLEMENT
To: A list for developers using the SDL library. (includes SDL-announce)

Sent: Tuesday, May 26, 2009 10:33:42 AM
Subject: Re: [SDL] SDL 1.3 first test

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de?: Mar 26.5.09, Jonathan Dearborn a
?crit?:

De: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes
SDL-announce)"

Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps?? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck?? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT wrote:

Yes, I have direct rendering activated, glxgears is fast (more than
9000
FPS).
I run Linux.

— En date de?: Mar 26.5.09, Pierre Phaneuf a
?crit?:

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes
SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3.
You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sam,

I installed SDL1-3 and whatever it was I cant reproduce it any more.
All the tests I tried seem to work as they should.

Sorry about the noise,
PavelOn Tue, May 26, 2009 at 9:01 PM, Pavel Dudrenov <@Pavel_Dudrenov> wrote:

I have to admit that I tested that a few months ago. I’ll checkout the
code again and try it again.
Pavel

On Tue, May 26, 2009 at 2:31 PM, Sam Lantinga wrote:

That’s odd, because I’m developing on the Mac and I just tested them
yesterday.

What test are you having problems with?

See ya,
–Sam

On Tue, May 26, 2009 at 8:09 AM, Pavel Dudrenov <@Pavel_Dudrenov> wrote:

half of the test apps that come with SDL 1.3 source wont even run Mac.

On Tue, May 26, 2009 at 7:47 AM, Patryk Bratkowski wrote:

Did you check the test applications?

SDL may be compiled without OpenGL support.


From: julien CLEMENT
To: A list for developers using the SDL library. (includes SDL-announce)

Sent: Tuesday, May 26, 2009 10:33:42 AM
Subject: Re: [SDL] SDL 1.3 first test

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de?: Mar 26.5.09, Jonathan Dearborn a
?crit?:

De: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes
SDL-announce)"

Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps?? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck?? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT wrote:

Yes, I have direct rendering activated, glxgears is fast (more than
9000
FPS).
I run Linux.

— En date de?: Mar 26.5.09, Pierre Phaneuf a
?crit?:

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes
SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in 1.3.
You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as it
was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your code
to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No problem, glad to hear things are working now.On Tue, May 26, 2009 at 9:17 PM, Pavel Dudrenov wrote:

Sam,

I installed SDL1-3 and whatever it was I cant reproduce it any more.
All the tests I tried seem to work as they should.

Sorry about the noise,
Pavel

On Tue, May 26, 2009 at 9:01 PM, Pavel Dudrenov wrote:

I have to admit that I tested that a few months ago. I’ll checkout the
code again and try it again.
Pavel

On Tue, May 26, 2009 at 2:31 PM, Sam Lantinga <@slouken> wrote:

That’s odd, because I’m developing on the Mac and I just tested them
yesterday.

What test are you having problems with?

See ya,
–Sam

On Tue, May 26, 2009 at 8:09 AM, Pavel Dudrenov wrote:

half of the test apps that come with SDL 1.3 source wont even run Mac.

On Tue, May 26, 2009 at 7:47 AM, Patryk Bratkowski wrote:

Did you check the test applications?

SDL may be compiled without OpenGL support.


From: julien CLEMENT
To: A list for developers using the SDL library. (includes
SDL-announce)

Sent: Tuesday, May 26, 2009 10:33:42 AM Subject: Re: [SDL] SDL 1.3 first test

It happens with both methods: UpdateRects and Flip
My lib supports both refresh methods.

— En date de : Mar 26.5.09, Jonathan Dearborn
a

?crit :

De: Jonathan Dearborn
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes
SDL-announce)"

Date: Mardi 26 Mai 2009, 16h17

Seriously, 5 fps? You don’t even need to measure that to tell that
there’s a problem :wink:
Can you identify the bottleneck? Is it when you swap buffers?

Jonny D

On Tue, May 26, 2009 at 10:14 AM, julien CLEMENT < clementj2005 at yahoo.fr> wrote:

Yes, I have direct rendering activated, glxgears is fast (more than
9000
FPS).
I run Linux.

— En date de : Mar 26.5.09, Pierre Phaneuf a
?crit :

De: Pierre Phaneuf
Objet: Re: [SDL] SDL 1.3 first test
?: "A list for developers using the SDL library. (includes
SDL-announce)"

Date: Mardi 26 Mai 2009, 15h39

On Tue, May 26, 2009 at 9:21 AM, Patryk Bratkowski wrote:

I know the way things worked in 1.2 is no longer the fast way in
1.3.

You
might want to look at the source for the test apps, and update it
accordingly.

That’s not entirely accurate: the fastest way in 1.2 is no longer
the fastest way in 1.3, but it should be just as fast in 1.3 as
it

was in 1.2 (which might not be very much).

So the frame rates shouldn’t go down very much, but adapting your
code

to SDL 1.3 could give you a large increase compared to the software
SDL 1.2 back ends (like the GDI and the X11 back ends), at least if
you have hardware accelerated OpenGL (not sure how well the X11 back
end is accelerated).

This massive slowdown is bad. Julien, what platform and hardware is
this? If it’s Linux, you’ve got all the hardware accelerated setup
working (you can play Quake3, say)?


http://pphaneuf.livejournal.com/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org