Dx9 Max2d Updated

BlitzMax Forums/BlitzMax Programming/Dx9 Max2d Updated

Thanks Gabriel,

Its not easy to test one vs other, clicking. I myself cant clickfast enough. If you exceed the Particle Cache it will grow, I just defaulted to 2600 as that was fastest I could click.

By definitely seems slower? Than the last version? Or Dx9 seem slower. I assume Dx9 seems slower as I didnt change anything that would affect rendering speed.

As for DX vs OpenGL, the big problem is unfortunatly architextural, limitations of the design of Max2d. Not so much OpenGL is better or DirectX is better API. Its more a fundimental difference in what the two API's are designed to due. The DirectX API requires a more batch oriented scene graph, so its dificult to get similar performance espeically if you create a lot of render state changes, which is what the 2d rendering in Max2d does.

Other issue is the DirectX drivers need to do more setup work in BlitzMax code, and although its fast its not as fast as C code. Which is why using DEBUG when testing performance makes the DirectX look real bad.

I do have a couple of Optimizations that I need to look at as reading dx9 driver debug spew, I have many unnecessary state changes. But alas its mostly a balance as to what is good enough kinda thing, for a limited 2d API.

Personally I understand what Max2d is trying to do, however from a card/api design point of view, there would be a better way to set up this stuff for rendering and get extreme performance at expense of easy coding style. Just look at how DrawText and Images or Anim Images work makes me cringe as it thrashes the textures. Just nothing I can do as the driver has to implment the code the way its structured.

Thanks again for feedback, still looking for someone with that Intel Motherboard GPU.

Doug Stastny