Re: [AD] New possible driver and accelerated features?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi,

It's just a suggestion to you guys.... Use DX7 for 2D. I've already
mentioned about support for various HW-accelerated blending functions,
support for more key-colors, more pixel formats etc....

There are more functionalities available with the LPDDSDESC2, which I
would ask u guys to look into :)

Regards,
Karthik.

On Sun, 3 Oct 2004 00:44:53 +0100, Chris Jones <cj@xxxxxxxxxx> wrote:
> > As for a new (gfx) driver idea, what about a DirectX 9 (or even 7 or
> > 8)  driver that's seperate from the current one? I don't use Windows
> > anymore, but given the advantages that 7/8/9 have over 3 (or 2?), I
> > think having a newer version available would be well worth it, even
> > if  it is a seperate driver.
> 
> In case it motivates anyone else to try, I thought I'd attach my DX8 driver
> (in so far as it got), since I won't be tinkering with it for a while.
> 
> Basically, I wrote this driver to test 2D graphics using DX8 but have been
> sourly disappointed by the speed. I've tried both with a lockable back
> buffer and with texture rendering for the back buffer, but both are
> significantly slower than the current allegro DDraw driver.
> 
> The test program I've been using is as follows:
> 
> #include <allegro.h>
> #include <winalleg.h>
> #include <stdio.h>
> 
> extern HWND allegro_wnd;
> 
> int main (int argc, char* argv[]) {
> 
>  int starttime, loops = 0;
>  char buff[100];
>  int now;
> 
>  install_allegro (SYSTEM_AUTODETECT, &errno, atexit);
>  install_keyboard();
> 
>  set_color_depth(32);
>  if (set_gfx_mode(GFX_DIRECT3D, 640, 480, 0, 0)) {
>  //if (set_gfx_mode(GFX_DIRECTX, 640, 480, 0, 0)) {
>    MessageBox(allegro_wnd, allegro_error, "Init", MB_OK);
>    return 1;
>  }
> 
>  starttime = time(NULL);
>  while (!key[KEY_ESC]) {
>    clear_to_color(screen, rand() % 0xffffff);
>    loops++;
>  }
> 
>  now = time(NULL);
>  sprintf(buff, "%d loops in %d secs; %d fps", loops, now-starttime, loops /
> (now-starttime));
>  MessageBox(allegro_wnd, buff, "What", MB_OK);
> }
> 
> With my D3D driver, I get about 35 fps; if I swap the commented set_gfx_mode
> lines, I get about 3200 fps with the standard DDraw driver.
> 
> I hope someone finds the attached useful - it would be cool to have a D3D
> driver in allegro, if the performance issues can be resolved.
> 
> Cheers,
> Chris
> 
> 
> 


-- 
V Karthik Kumar




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/