[SDL] Speeding up my render..

Alan Wolfe atrix2 at cox.net
Thu Jun 16 11:36:19 PDT 2005


Doing things in opengl is different than doing things in sdl, the function
calls are different and things are structured very differently.

If you are planning to convert to opengl later, why not just do it now and
save yourself some time and effort?

no sense in optomizing code you are just going to throw away later
anyways...

----- Original Message ----- 
From: "Matt Pruett" <entelin at logicaldreams.net>
To: "SDL" <sdl at libsdl.org>
Sent: Thursday, June 16, 2005 1:01 PM
Subject: Re: [SDL] Speeding up my render..


> On Thu, 2005-06-16 at 08:28 -0400, Ryan C. Gordon wrote:
> > > However I think it should go faster... Any suggestions?
> >
> > Did you convert the tiles to screen format?
>
> I was a little confused on this actually... I think they are the same,
> how can I be sure? This is how I init the screen and then the surface I
> am blitting from...
>
> this->screen = SDL_SetVideoMode (SCREENSIZEX, SCREENSIZEY, SCREENSIZED,
> SDL_FULLSCREEN|SDL_SWSURFACE|SDL_DOUBLEBUF);
>
> this->tilelayer = SDL_CreateRGBSurface(SDL_SWSURFACE, 2560, 2560,
> SCREENSIZED, RMASK, GMASK, BMASK, 0);
>
> #if SDL_BYTEORDER == SDL_BIG_ENDIAN
> #define RMASK 0xff000000
> #define GMASK 0x00ff0000
> #define BMASK 0x0000ff00
> #define AMASK 0x00000000
> #else
> #define RMASK 0x000000ff
> #define GMASK 0x0000ff00
> #define BMASK 0x00ff0000
> #define AMASK 0x00000000
> #endif
>
> >
> > Try rendering with OpenGL and get several thousand frames per second.
> >
> > Those are my recommendations without having seen the code. Those are the
> > usual culprits.
>
> Its a good idea.. I think perhaps it would be best if I did that later,
> under gl I could pretty much tell it to do anything and it would get
> done and at blazing speeds, but I want to make sure it will run well
> regardless.
>
> >
> > --ryan.
> >
> >
> >
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> >
> > !DSPAM:42b17af970402095973125!
> >
> >
> -- 
> Matt Pruett <entelin at logicaldreams.net>
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl





More information about the SDL mailing list