Archived

This topic is now archived and is closed to further replies.

JonatanHedborg

A total newbie question... regarding DX

Recommended Posts

So, ive been using DJGPP w/ allegro for a while now, and i think its time for me to move on to something a bit more proffesional... Like DirectX. I have MSVC6.0, the SDK etc... Now i just have to get a SIMPLE sample program, so i can learn how to use it... The problem is that i really cant find one... sob... ohh well, if anyone commes across one, please post the adress here... or send it to my email (jonatan.hedborg@chello.se) Thanks in forehand (hmm, is that correct english?) ======================= Game project(s): www.fiend.cjb.net

Share this post


Link to post
Share on other sites
Allegro is a great starting point however most programs made with it are all in C. Which as I said is a good starting point. As you get into Windows programming and Direct X you realy need a little bit of a grasp on C++. Classes and name spaces specificaly. After that you should be able to find some sample programs that are "simple" enough to get you started. I''d start with the DOS to DirectX samples in the programming section of game dev.

Share this post


Link to post
Share on other sites
Well, Windows programming and DirextX are 2 seperate but related things. I''d REALLY suggest learning one or the other first, then move on to the other when you start to get comfortable with the first.

You can write console applications that open up DirectX Windows etc... and then you''ll just have to deal with a bare minimum of Win32 like very basic message handlers and window creation.

I would suggest learning the basics of Win32 first though, it''ll make your directx experience much less of a headache. You don''t need to know very much COM for DirectX, but you do need to understand message handling, thread scheduling (a little) and such.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You could always invest in a copy of Andre LaMothe''s "Tricks of the Windows Programming Guru''s". It''s got some pretty good introductory stuff (or just borrow a friend''s copy). It explains enough C++ to get into basic Window''s programming and DirectX. I''m not sure where to get any simple DX source for free though.

Share this post


Link to post
Share on other sites
There is some good starter source code in the triangle demo TrivWin and TrivFS in the Direct3dX section, but just remember they are using d3dx, and in most apps you will find that they create the interfaces themselves. There is a tutorial on this inside the docs as well.

However, I would also recommend Kovach''s "Inside Direct3D" for a semi-decent starter (ignoring the simple fact that Mr. Kovach leaves out A LOT of explanation for his code) because it shows how to set up d3d and prepare for rendering.

If you want to waste some money, there is always "Teach yourself DirectX7 in 24 hours" <<<----- LAUGH!


Hope this helps.

-Etnu

Share this post


Link to post
Share on other sites
There''s a series of Win32/DirectX tutorials on my site (though I haven''t gone too far into DirectX yet) which I think are pretty easy to understand, and several of them have example programs you can download along with them. Follow the link in my sig and go to the "Resources" section.

-Ironblayde
 Aeon Software

The following sentence is true.
The preceding sentence is false.

Share this post


Link to post
Share on other sites
quote:
Original post by JonatanHedborg
Thanks in forehand (hmm, is that correct english?)



It's "Thanks in advance"

I only use DirectX to go into fullscreen mode and create a front buffer...I keep all my other surfaces in surface memory and handles the rest myself, it's way much faster than having DirectX do it (no I don't want to use any video memory surfaces! No kick ass D3D enhanced effects either ) and I don't have to deal with almost any of the DirectX API, yay.

"Paranoia is the belief in a hidden order behind the visible." - Anonymous

Edited by - Staffan on October 31, 2000 2:00:35 PM

Share this post


Link to post
Share on other sites
I resently converted from DOS programming using Allegro to DirectX, at first I used DX with winallegro but I soon gave that up, you have much more control if you use clean API coding

anyway here some good tutorials that should help you getting started (don''t worry if you don''t understand the window coding, you''ll learn in time)

http://users.ox.ac.uk/~ball0597/Reference/WindowsProgramming/DirectX/

Share this post


Link to post
Share on other sites
MrGameMaker has some fair tutes on the basics of directX and windows. also, the MSDN is invaluable.

check the FAQ of this board for other links

on another note, I''ve managed to get directX working with LCC-win32.
So it can be done for free, and, more to the point, it can be done in C.

in the MSDN there is a small article ''Accessing COM objects by using C''

so, where in c++, you use :

ret = lpDD->CreateSurface(&ddsd, &lpDDS, NULL)

in C you''d use:

ret = lpDD->lpVtbl->CreateSurface (lpDD, &ddsd, &lpDDS, NULL);

Just thought i''d mention this as someone said you need to know some COM to program directX

Wyzfen

Share this post


Link to post
Share on other sites