No, although if your ellipse was always the same size you could just draw that once at the beginning of your program (or whenever it changed size/colour, assuming that was infrequently), since using the canvas is slower than a normal draw.
No, although if your ellipse was always the same size you could just draw that once at the beginning of your program (or whenever it changed size/colour, assuming that was infrequently), since using the canvas is slower than a normal draw.
[size=10px][ Join us in #pgd on irc.freenode.net ] [ Sign the Petition for a Software Patent Free Europe ][/size]
This is slightly off-topic, but it explains Clootie's initial reply ("Use Direct3D"). Any alpha blending (translucency) you do in DirectDraw is not hardware accelerated -- it's done on the CPU instead, which is the reason why it's such a hit (the CPU goes over the images pixel-by-pixel and can't do much else until this is done). You do get transparency (colour keying) in DDraw, which is just an on/off toggle of image colours. However, do not get lulled into thinking that every function call you make to DelphiX will be done on hardware, because a lot of them aren't.
The only ways to speed up translucency are to optimise the DelphiX translucency routines using hardcore code (e.g. hand-crafted assembly, MMX, SSE1 and/or 2, depending on the needs -- MMX is usually good here) or to use 3D hardware to your advantage. However, the speed-up-DelphiX option is likely to be more than a little pain in the butt.
Direct3D and OpenGL can be configured to display 2D images (I have a slightly long-winded framework that demonstrates this in a recent thread for OpenGL). With 3D APIs, rotation, scaling and translucency are all on hardware, which means they get chewed up and spat out by the graphics card without any hassle. The net result is that these special effects are very much faster.
Don't go thinking that DelphiX is a magic bullet. If a function seems to cause an unlikely speed hit, it's possible it could be getting done the hard way on the CPU, rather than hardware-accelerated as with a 3d API.
But I don't want you to take this message as me trying to force you off DelphiX. I'd advise you to wean yourself off it, however, for upcoming projects (maybe by slowing building up your own framework, like everyone and their dog have done for Delphi so far , or by using something else a bit newer -- most of component sets that have their own forums on the front page, for example).
"All paid jobs absorb and degrade the mind."
<br />-- Aristotle
Ok, thanks.Originally Posted by Alimonster
Look, here's the deal, i'm using Delphi7 and WinXP, plus DirectX, so, what other component set do you propose me? I need to know where to get both the suite and the manuals to learn how to use it. If you can help me out with this one i'd be very gratefull.
Hi, there are lots of ones out there, take a look at the front page of the forums and you will see a list of some of the more popular ones that our out there. Just post in those forums to get information about each one.
Thanks
Bobby
Omega Components
Bobby Baker
<br />Delphi Sanctuary
<br />www.delphisanctuary.com
thanks again, but aniwayz, i'd like to know wich one do you suggest me for 2D games with alpha blendings and rotations, zooms, blurs etc? Going to the front page in search for something isn't the ideal solution, since i don't know what a compunent palette is designed for only based on it's name.Originally Posted by Bobby
Well my opinion is obviously biased, but try the components me and my team are working on , www.delphisanctuary.com It's called the omega components, and its a nice set of components. There are lots of component sets out there though
Bobby
Bobby Baker
<br />Delphi Sanctuary
<br />www.delphisanctuary.com
will do, thanksOriginally Posted by Bobby
Bookmarks