sdl-request at libsdl.org wrote:>Send SDL mailing list submissions to
sdl at libsdl.org
To subscribe or unsubscribe via the World Wide Web, visit
http://www.libsdl.org/mailman/listinfo/sdl
or, via email, send a message with subject or body ‘help’ to
sdl-request at libsdl.orgYou can reach the person managing the list at
sdl-admin at libsdl.orgWhen replying, please edit your Subject line so it is more specific
than “Re: Contents of SDL digest…”Today’s Topics:
- Re: Accelerated Blitting under X11 for GeForce 3? (Roger D. Vargas)
- Re: Accelerated Blitting under X11 for GeForce 3? (Shawn)
- optimized drawing methodsI (Chris Thielen)
- Re: Accelerated Blitting under X11 for GeForce 3? (Pallav Nawani)
- cross-compiling (huangwei at sunplus.com.cn)
- can not initialize sdl (huangwei at sunplus.com.cn)
- Re: optimized drawing methodsI (Corona688)
- Re: can not initialize sdl (Corona688)
- Re:Re: [SDL] can not initialize sdl (huangwei at sunplus.com.cn)
- Re: Accelerated Blitting under X11 for GeForce 3? (Patrick McFarland)
- Re: optimized drawing methodsI (Patrick McFarland)
- Re: Re: [SDL] can not initialize sdl (Patrick McFarland)
- Re: Accelerated Blitting under X11 for GeForce 3? (Clemens Kirchgatterer)
- Re: Re: Re: [SDL] can not initialize sdl (huangwei at sunplus.com.cn)
- Re: Accelerated Blitting under X11? (Rafa3 Bursig)
- Re: Accelerated Blitting under X11? (Clemens Kirchgatterer)
- Re: Accelerated Blitting under X11? (Rafa3 Bursig)
- Re: Accelerated Blitting under X11 for GeForce 3? (Pallav Nawani)
- Re: Accelerated Blitting under X11? (Clemens Kirchgatterer)
- Re: Accelerated Blitting under X11? (Sandra)
- Re: Accelerated Blitting under X11? (Rafa3 Bursig)
- Re: Accelerated Blitting under X11? (Pallav Nawani)
- SDL and windowless type app thingies (Sweeney, Steven (FNB))
- Get the window position on SDL/X11 (Gabriele Greco)
- Sun’s high-end cards and ‘best’ bit depth selection. (Vincent S. Cojot)
- Re: Accelerated Blitting under X11 for GeForce 3? (Bettina Rathmann)
- SDL with MFC MDI? (Robert H. Oujesky)
–––
Message: 1
Date: Wed, 15 Jan 2003 16:22:55 -0500 (CST)
From: “Roger D. Vargas”
To: sdl at libsdl.org
Subject: Re: [SDL] Accelerated Blitting under X11 for GeForce 3?
Reply-To: sdl at libsdl.orgOn 15 Jan 2003, Shawn wrote:
You will get accelerated blits with the latest drivers if you’re using
DGA or the XRender extension to do 2d operations.DGA is blazingly fast and works great under the latest NVidia drivers.
DGA requires root privileges.
–
Roger D. Vargas | El sistema se apagara en 5 segundos.
ICQ: 117641572 | Salvese el que pueda!
Linux User: 180787 |–––
Message: 2
Subject: Re: [SDL] Accelerated Blitting under X11 for GeForce 3?
From: Shawn
To: sdl at libsdl.org
Organization: http://www.warpcore.org/
Date: 15 Jan 2003 16:57:36 -0600
Reply-To: sdl at libsdl.orgOn Wed, 2003-01-15 at 15:22, Roger D. Vargas wrote:
On 15 Jan 2003, Shawn wrote:
You will get accelerated blits with the latest drivers if you’re using
DGA or the XRender extension to do 2d operations.DGA is blazingly fast and works great under the latest NVidia drivers.
DGA requires root privileges.
That is the fault of the X architecture. Not the drivers.
–––
Message: 3
From: Chris Thielen
To: sdl at libsdl.org
Organization:
Date: 15 Jan 2003 20:35:39 -0800
Subject: [SDL] optimized drawing methodsI
Reply-To: sdl at libsdl.orgI was wondering if anybody could explain this to me, I’m running under
X11 and I don’t know if Win32 would show much difference, but here goes:I’ve been trying to get my application to draw as fast as possible, as
I’m a hobbyist programmer/learn-as-I-go and I’ve had to rewrite some
pretty crappy code from the past, and I’m sure I’ll rewrite it again.
But I’ve been going through various methods of blitting and I was
wondering if somebody could explain the results to me:ORIGINAL METHOD:
My original method consisted of a simple double buffer. I had a
software surface the size of the window, I’d blit and scratch pixels
there. It was divided into tiles, and if any pixel within a tile (they
were about 30x25 or something like that) was drawn to, that pixel became
dirty, and when all the drawing as done, my flip function would go
through and flip all the tiles that were dirtied. gprof showed that
function to be slow, so I tried speeding it up and to reduce blits I
wrote some code to detect blocks of tiles and such. Okay, that’s my
original method, a simple double buffer. It took about 50% cpu during
normal gameplay and 85% during heavy action.SECOND METHOD:
My second method was taken from the programmer of LGames. I asked the
maker of lbreakout2 how he got this application to draw, and so I took
his advice and avoided SDL_Flip(). I simply drew directly to the window
surface, writing code to wait for a lock for scratching and got all that
done. I then had a large array of SDL_Rects which I kept track of all
blits, and when it came time to flip, I used SDL_UpdateRects() and
updated them all. This was a major performance increase. 20-30% cpu
during gameplay and 45% during normal gameplay. All these benchmarks are
under X11.THIRD METHOD:
I thought I’d try and be smart and combine both methods, so I could
blit and scratch around in memory, arguably faster, right? The only
different between this and my original method, is I’d use a large array
of SDL_Rects() from my second method. So I blit/scartch to the
backbuffer, remember the exact rects I did this in, then
SDL_UpdateRects() on all those. This method proved to be slightly faster
than my original, method, but no where near as fast as the second
method. This method was about 20% slower in everything from my second
method.Can anybody explain why the third method wasn’t faster? I’m not entirely
sure. I think maybe there’s a huge slowdown in calling SDL_BlitSurface()
a bazillion times, but shouldn’t the original backbuffer method be the
fastest anyway? Don’t most games use a simple dobule buffer? Why is the
second method, literally just blitting as I need to draw/erase and then
calling SDL_UpdateRects() on a large array the fastest way to do it?
Does anybody know why maybe the double buffer method wasn’t the fastest?
Thanks for your thought, I’m not sure why it wouldn’t be the fastest.
Thanks.
SDL_Flip copy entire bitmap, ok, but… SDL_HW_VIDEO_SURFACE is blitter
from graphic card to graphic card no?
if geforce 3 hasn’t 90mb++ Bus band speed more must be take an S3 Trio
to be faster :))) … hum, seriously,
compute sum of your blits and compare to your AGP bus bandwidth (check
your AGP4x is ok)
Check geforce model, (exemple, Geforce2mx200 agp1x is munch slower than
a Matrox g200 PCI !)
if you use SDL_Flip, assure have screen on Video Memory (not AGP memory)
keep out kde/gnome and try with NO windowmanager, kde take most AGP
bandwitdh to redraw permanently (with no kde i have 30% gain speed on
Geforce2MX400 agp1x 128Mo AsusP2B/Celeron333A).
Good day.