Click to See Complete Forum and Search --> : really fast drawing


inbugable
April 26th, 2008, 12:13 PM
hi, how is it possible to have very fast 2d drawing for UI like in gecko or aol's boxely? boxely does not use directx or gdiplus, does anyone know how to do similarly?

JamesSchumacher
April 27th, 2008, 08:19 PM
hi, how is it possible to have very fast 2d drawing for UI like in gecko or aol's boxely? boxely does not use directx or gdiplus, does anyone know how to do similarly?

DirectDraw? Combined with GetDC member of IDirectDraw7 interface so you can still use GDI functions.

DirectDraw public support stopped after version 7. However, you can still use IDirectDraw7. Microsoft pushes Direct3D and never makes much mention of DirectDraw. You can still use the older DirectDraw interfaces. If DD still exists as newer releases of DX, then they are private interfaces not documented by MS.

IllegalCharacter
April 27th, 2008, 10:55 PM
You can use OpenGL too. Or, try downloading the source (http://developer.mozilla.org/en/docs/Gecko_Embedding_Basics) for Gecko and take a peek at that.

inbugable
April 28th, 2008, 04:41 PM
boxely doesnt use any of those, how to be done? i think it uses createdibsection but then to draw, must use asm for fast?

IllegalCharacter
April 30th, 2008, 10:29 AM
I think you're going about this the wrong way. There are usually several ways to solve a given problem. By wasting a lot of time trying to figure out how somebody else did it, why not just do it your own way with other resources at your disposal?

You probably COULD go into assembly to do it, but unless you're a **** good assembly programmer, the C compiler will make faster assembly than you will. I'd recommend just doing it with C or C++. Using OpenGL or Direct3D probably won't be any slower.

If you don't want to go into a 3D library, you can try SDL (http://www.libsdl.org/) and just put pixels to the window. This will be super-fast, and a heck of a lot easier than using assembly for your program.

inbugable
April 30th, 2008, 06:23 PM
I want to do like boxely, boxely is so fast :(

IllegalCharacter
May 2nd, 2008, 04:51 PM
Then I'd recommend going with C and some library, be it DirectX, OpenGL, SDL, or whatever. They probably either used one of those, bought a commercial library to use, or rolled their own. I doubt you'll want to do the second or third options.

If you want extra fast, DirectX or OpenGL have hardware acceleration, so you can do cool things like rotations and fading really quickly.

Like I said before, you have to be really good at assembly in order to actually get assembly code faster than C, since the compilers have gotten really good at optimizing code. Assembly is only faster if you're an expert, otherwise it'll likely be slower.