I had problems with older versions of ID3DXSprite, and was angry at its newest version.. so I figured I needn't the d3dx9 tools.... And I figured it'd be interesting to share the results
Currently I've tested it only on my crappy mobo-integrated GPU, and I haven't done benchmarks... but seems like it'll serve (me) well..
I got tired of drawing+coding many sprites in several modes (normal, tinted, light-emitting) and fighting all limitations of DirectDraw.... Now just a xBltAddStretch, and it's all fine :)
The textures are loaded in R5G6B5 or A8R8G8B8, and I'm not sure if these are supported on all (non-extremely-obsolete.... ie GeForce2 or better) GPUs.
The size of the exe is because of the statically-linked bmp1, which is 140kB compressed...
Currently I've tested it only on my crappy mobo-integrated GPU, and I haven't done benchmarks... but seems like it'll serve (me) well..
I got tired of drawing+coding many sprites in several modes (normal, tinted, light-emitting) and fighting all limitations of DirectDraw.... Now just a xBltAddStretch, and it's all fine :)
The textures are loaded in R5G6B5 or A8R8G8B8, and I'm not sure if these are supported on all (non-extremely-obsolete.... ie GeForce2 or better) GPUs.
The size of the exe is because of the statically-linked bmp1, which is 140kB compressed...
Good stuff, if somewhat difficult to read :P
Was there any particular reason for choosing to use quads rather than pointsprites?
Was there any particular reason for choosing to use quads rather than pointsprites?
Spritesheets, for example. I need that flexibility :) .
Btw, I also moved to a mobo-integrated GPU.. (after my PC died.. had to give away a recently-bought R9600GE for the lack of AGP on the mobo...) And here DirectDraw isn't accelerated! While 3D is ...
Btw, I also moved to a mobo-integrated GPU.. (after my PC died.. had to give away a recently-bought R9600GE for the lack of AGP on the mobo...) And here DirectDraw isn't accelerated! While 3D is ...
I did a real-world benchmark of this engine... the results are outstanding!
A 1014x740 window, 32bpp, 6 spritesheets (ranging from 256x512 to 1024x256, most are in 565 format), first drawing large backgrounds, then 2500~3000 small xBlt() operations (and sometimes using xBltStretch) and several large xBltAddStretch() ractangles. Overdraw is around 60%, wasted switching between textures is around 10%.
Rendered at 25fps when passive, and up to 100fps when active (user drags a control with the mouse).
Result: 0% cpu detected.
for a run of 2 minutes, total kernel-time is 240ms, total user-time is 40ms. 7400 context switches.
This on a Sempron3000+, 512MB DDR400, win2k, integrated Geforce6100.
Visual problems: lagging ~100ms when dragging around the window, but this can be the fault of the parent MDI client window's scrollbars...). But most other apps lag ~80ms when dragged here anyway..
Upgrading from my iDraw (DirectDraw) engine proved painless :> , though I had to convert all bitmaps with magenta into 32bpp .tga .
A 1014x740 window, 32bpp, 6 spritesheets (ranging from 256x512 to 1024x256, most are in 565 format), first drawing large backgrounds, then 2500~3000 small xBlt() operations (and sometimes using xBltStretch) and several large xBltAddStretch() ractangles. Overdraw is around 60%, wasted switching between textures is around 10%.
Rendered at 25fps when passive, and up to 100fps when active (user drags a control with the mouse).
Result: 0% cpu detected.
for a run of 2 minutes, total kernel-time is 240ms, total user-time is 40ms. 7400 context switches.
This on a Sempron3000+, 512MB DDR400, win2k, integrated Geforce6100.
Visual problems: lagging ~100ms when dragging around the window, but this can be the fault of the parent MDI client window's scrollbars...). But most other apps lag ~80ms when dragged here anyway..
Upgrading from my iDraw (DirectDraw) engine proved painless :> , though I had to convert all bitmaps with magenta into 32bpp .tga .
Please could you upload your macro file.
Source code for pCall , UseMost and UseAll macros seems to be missing.
It looks cool and i wanna play! :)
Source code for pCall , UseMost and UseAll macros seems to be missing.
It looks cool and i wanna play! :)
These pCall, and stuff... starting to use them isn't just a "copy/paste the macro and go". They're a part of my Base/BankSDK, and there you are forced to use the provided malloc/free macros, and change your coding style a bit (or maybe a lot). Imho it's all for good, since /me being the all-around-lazy-coder I've been mastering and improving the art of "typing less, getting more done" for quite some time ^^. And I lose some cycles here and there (don't optimize completely), but it's for the sake of stability and sanity (what scares me the most is a 100,000-line project that just crashes inexplainably on someone's machine).
Ah anyway, you can get the Bank/BaseSDK in www.ultranos.com/asm_old "ATC2 + Bank.lib" . "ATC1+tutes" there are a starter's guide.
Ah anyway, you can get the Bank/BaseSDK in www.ultranos.com/asm_old "ATC2 + Bank.lib" . "ATC1+tutes" there are a starter's guide.