Posts: 1,556
Threads: 298
Joined: Dec 2002
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.
Posts: 3,343
Threads: 83
Joined: Mar 2003
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...
Posts: 451
Threads: 16
Joined: Feb 2003
Why not just download the DirectX SDK, it's full of sources and exmaple code for every DX function.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Posts: 1,845
Threads: 44
Joined: Aug 2002
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.
Posts: 3,279
Threads: 170
Joined: Nov 2003
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++.
I could write it in VB6 code but it wouldn't translate properly because the methods are very different...
C'mon guys, surely someone actually knows how to do this and can offer a little help? It's not all that difficult...
I'd knock on wood, but my desk is particle board.
Posts: 1,556
Threads: 298
Joined: Dec 2002
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...
Posts: 1,845
Threads: 44
Joined: Aug 2002
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.
I adviced him to use OGL instead
Posts: 1,407
Threads: 117
Joined: Dec 2002
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...
Antoni
Posts: 451
Threads: 16
Joined: Feb 2003
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.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Posts: 1,556
Threads: 298
Joined: Dec 2002
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.