Qbasicnews.com

Full Version: I need a favor.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Can someone write a simple C++ program, that will use DirectX to draw a bitmap on the screen? And in as few lines as technically possible. And also, remark the source code extremely heavily.

Thanksness.
Why don't you ask google? I heard that it takes 200+ lines just to draw a triangle, and most of that is initialisation code...
Why not just download the DirectX SDK, it's full of sources and exmaple code for every DX function.
DirectX
SUCKS! You need a whole lot of code to draw a point!!!! Leave aside a bitmap.

Therefore... I prefer...
OpenGL
Much easier to learn, a whole lot faster, requires less code, is compatible with Linux, but doesn't work properly on ATI Radeon Cards.

Tutorials: http://nehe.gamedev.net.
As usual, no one's bothered to offer any real help, just doing the usual "RTFM" or "Use this! It's so much better!" crap.

Rockuman, I'd help ya out but I don't know jack shyte about using DirectX in C++. Sad I could write it in VB6 code but it wouldn't translate properly because the methods are very different... Sad

C'mon guys, surely someone actually knows how to do this and can offer a little help? It's not all that difficult...
Quote:with Linux, but doesn't work properly on ATI Radeon Cards.

Well then... I can't make what I can't play...

adosorken: Maybe you could show me how to draw a bitmap, and I could attempt to translate it. I know most of the keywords, but knowing how and where to use them is the hard part...
Quote:As usual, no one's bothered to offer any real help, just doing the usual "RTFM" or "Use this! It's so much better!" crap.
Hey, sorry Nek, but I don't know DX. Wink I adviced him to use OGL instead Smile
The DirectX9 SDK is 190 Megs of download.
Unfortunately DirectDraw has disappeared into Direct3D. There are no examples in the SDK for simple 2D drawing...
Actually there is.

D3DXSprite

You still need to setup the device and all that junk, but you can use D3DXSprite to handle all the conversions of 2d -> 3d.
Quote:The DirectX9 SDK is 190 Megs of download.

190 Megs of Installation... if you have the CD.

I have the SDK...
I know it's been merged with Direct3D...
I'm aware of all that stuff. I just need a simple example of how to draw a bitmap... and remarked.
Pages: 1 2 3 4