As the Object suggest it i have some words about SDL Win32 version and CDX which is a lib on top of DirectX…
Well recently i decided to do some multi-platform coding. I’ve found SDL and decided to use it. But when i did some heavy tests, like blitting 4 320x240 pics on a 640x480 screen, the FPS told me something like 15-20 !!
I was not sure if my way of coding was efficient so i download CDX and port the code to it. Result : 45 FPS (with vertical sync wait), 89 FPS (without) !!
So my question is simple : where are the 25 ( = 45 - 20) frames missing from SDL ??
And remember Both SDL and CDX codes are nearly the same on the same computer…
olivier.
As the Object suggest it i have some words about SDL Win32 version and CDX which is a lib on top of DirectX…
Well recently i decided to do some multi-platform coding. I’ve found SDL and decided to use it. But when i did some heavy tests, like blitting 4 320x240 pics on a 640x480 screen, the FPS told me something like 15-20 !!
I was not sure if my way of coding was efficient so i download CDX and port the code to it. Result : 45 FPS (with vertical sync wait), 89 FPS (without) !!
So my question is simple : where are the 25 ( = 45 - 20) frames missing from SDL ??
And remember Both SDL and CDX codes are nearly the same on the same computer…
CDX probably defaults to having surfaces in video memory while SDL doesn’t
place them there unless you explicitly request it by using the SDL_HWSURFACE
flag.
This is probably the cause of the discrepancy. See the testsprite test
program for details on using hardware acceleration.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
Hows the function SDL_DisplayFormat() work in windows? In linux it almost
doubled my framrate in some cases.On Sun, 5 Mar 2000, Sam Lantinga wrote:
As the Object suggest it i have some words about SDL Win32 version and CDX which is a lib on top of DirectX…
Well recently i decided to do some multi-platform coding. I’ve found SDL and decided to use it. But when i did some heavy tests, like blitting 4 320x240 pics on a 640x480 screen, the FPS told me something like 15-20 !!
I was not sure if my way of coding was efficient so i download CDX and port the code to it. Result : 45 FPS (with vertical sync wait), 89 FPS (without) !!
So my question is simple : where are the 25 ( = 45 - 20) frames missing from SDL ??
And remember Both SDL and CDX codes are nearly the same on the same computer…
CDX probably defaults to having surfaces in video memory while SDL doesn’t
place them there unless you explicitly request it by using the SDL_HWSURFACE
flag.
This is probably the cause of the discrepancy. See the testsprite test
program for details on using hardware acceleration.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
Yes !! and thanx !!
Well i looked testsprite.c and found that there was some conversion with the SDL_DisplayFormat function and then the FPS jumped from 15-20 to 86-89 !!
What a f*cking jump i must say !!
Finally this problem was a good thing : now my code support 2 lib : SDL and CDX. I know i could support SDL only but it’s a good exercice to try…
Well Sam (and Andrew Shakinovsky) thanx again.
Olivier.
Yes !! and thanx !!
Well i looked testsprite.c and found that there was some conversion with the SDL_DisplayFormat function and then the FPS jumped from 15-20 to 86-89 !!
What a f*cking jump i must say !!
Great! 
Well Sam (and Andrew Shakinovsky) thanx again.
You’re welcome. 
See ya,
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec