Re: [GD-General] Graphic Library and market share
Brought to you by:
vexxed72
|
From: Sebastian U. <li...@in...> - 2004-01-08 17:16:21
|
We'll give that a try first then, before trying the switch to dx.
Thanks for the advice!
I also remember we had some problems with the handling of HWSURFACEs
and back buffer (some strange things with the color channels changing
when we switched between fullscreen and window mode), but due to our
inexperience with SDL we aren't sure if it's our fault or SDL (we *do*
know that there were some bugs with ARGB -> ARGB surface blitting,
didn't find any reference to this solved on the web - will keep looking
for answers :) ).
So all this problems are pushing us to try other rendering
library... And as I said before, we don't want to restrict our target
audience (by using "slow" SDL or "fast-hardware-demanding" DX).
brian sharon wrote:
> Switching to DirectX won't necessarily fix your alpha-blending
> problems, as the crappy machines are also the least likely to support
> hardware-accelerated 2D blits (I'm just assuming 2D here as you're
> using SDL). Of course you can switch to a 3D API and get blending
> done by the hardware, but then you'll be requiring hardware
> acceleration for a 2D game, which is probably not what you want to do :)
>
> I would guess that you're setting up your back buffer in video memory
> and rendering your sprites there. What kills you there is the need to
> read rendered pixel values back off the video card so that the CPU can
> do the alpha blend between source and destination. Transferring data
> back from the video card is slooooooow.
> I had the same problem with an SDL app a couple of years ago. Here's
> how I set things up to fix it:
>
> * render the entire frame to a buffer in system memory (with
> alpha-blending enabled)
> * do one large screen-sized copy blit from system memory to the back
> buffer on the video card
> * flip the back buffer to the front
>
> Switching to rendering in system memory provided a significant
> performance boost for me. I'd try that before you rewrite your app.
>
> --brian
--
///
Sebastián Uribe
Inmune Games
su...@in...
www.inmune.com.ar
|