Skip to main content
gamedev.net
🔒 Locked

Good DirectX tutorial

Started by Oxygenium 21 replies 1.5k views
Original Post
Oxygenium
Oxygenium
Im searching for any good tutorial to DirectX 8.1. Ive searched google and there`re many tutorials, but which of them do you recommend? Oxygenium
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
Peon
Peon
Do a google search on drunkenHyena or andypike. I don''t remember the url off the top of my head. Both sites have excellent DX8 D3D tutorials.
Peon
Oxygenium
Oxygenium
More than enough? When I try to copy and paste some of that tutorials and then compile it, I get errors. Strange erros (something undeclared and so on...). Maybe it is because Im using MinGW 3.2, but I thought, that DirectX can be programmed under any other compiler (that support it and if you have SDK (I have both)). When therere errors in which I`m going to learn from, how can I learn that?

Oxygenium
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
DrunkenHyena
DrunkenHyena
quote:
Original post by Oxygenium
More than enough? When I try to copy and paste some of that tutorials and then compile it, I get errors. Strange erros (something undeclared and so on...). Maybe it is because Im using MinGW 3.2, but I thought, that DirectX can be programmed under any other compiler (that support it and if you have SDK (I have both)). When therere errors in which I`m going to learn from, how can I learn that?


As far as I''m aware the only concern you have using MinGW is the libraries, the headers should be fine. 2 thoughts:
1)You do have the SDK properly installed, right? (INCLUDE paths set, etc)
2)When you cut and paste from the tutorials, are you bringing all the important bits with it?

I''m pretty sure there is nothing wrong with the tutorials.


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena</FON
Oxygenium
Oxygenium
Of course - Im not totaly stupid (but many people that knows me doesnt think so :-)) ).

Oxygenium

[edited by - oxygenium on April 15, 2003 3:12:52 PM]
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
DrunkenHyena
DrunkenHyena
I''ve never used MinGW myself, but here''s a tutorial that covers getting started with it. It has a link to info on using it with DirectX so it may give you what you need.

http://spacejack.org/games/mingw/


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena</FON
SnakeHunta
SnakeHunta
you cant just copy and paste the code...even if u are bringing all the includes with u...u have to add the libs into the compiler....d3d8.lib, d3dx8.lib, etc...in VC++ go to Prject-->Settings-->Link
Oxygenium
Oxygenium
I had a look at that page and Ive read there, that I CAN link My app using MinGW linker with Microsofts .lib s? So Ive looked over microsoft and found their SDK there. But about 160MB? It is really so big? Isnt there any smaller (but nothing worse) version? I think, that there`re many unsuseable things, like examples or anything else (Like Microsoft often do)

Oxygenium
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
Oxygenium
Oxygenium
I was searching for something like this, but I didnt found anything - Im sorry, but can you give me a direct link?

Oxygenium
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
Oxygenium
Oxygenium
DrunkenHyena! Ive just compiled your 2nd tutorial (after some modifications to get it back to std ANSI C++, like not using pure virtual class and so on). But theres run-time error (SIGSEGV) on line:


g_d3d_device->SetVertexShader(D3D8T_CUSTOMVERTEX);


Can you tell me what did you meant with that? Weren`t you drunken when you were writing this tutorial?

Oxygenium
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
Oxygenium
Oxygenium
IFooBar: Thats DX 9 dev-pack. It is possible to write real DX 8 apps with it? I meant apps that doesnt require DX 9 run-time installed on computer.

Oxygenium
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
DrunkenHyena
DrunkenHyena
quote:
Original post by Oxygenium
DrunkenHyena! Ive just compiled your 2nd tutorial (after some modifications to get it back to std ANSI C++, like not using pure virtual class and so on).


Huh? I don''t use any classes at all in my second tutorial.
quote:

But theres run-time error (SIGSEGV) on line:
g_d3d_device->SetVertexShader(D3D8T_CUSTOMVERTEX);

Can you tell me what did you meant with that?



This line tells D3D how your vertex is formed. There are quite a variety of possible vertex definitions. The only way I could see that causing a run-time error is if g_d3d_device isn''t set properly.

quote:

Weren`t you drunken when you were writing this tutorial?


No but I was heavily caffienated.


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena</FON
Oxygenium
Oxygenium
Im sorry for that virtual class - my mistake. But still - Ive checked all the code that initializes g_d3d_device - it`s the same as you written in your tutorial. Still - the pretty window pops up and my app crashes... Tryied you ever to run it? My code is exact copy of yours...

Oxygenium
---Unreadable code is code written on a piece of paper, but not the one, in which its programmer is using a space in place you don't.
IFooBar
IFooBar
quote:
Original post by Oxygenium
IFooBar: Thats DX 9 dev-pack. It is possible to write real DX 8 apps with it? I meant apps that doesnt require DX 9 run-time installed on computer.

Oxygenium


yes, that is possible. DirectX is backwards compatible so you can eaven write dx7, dx6 apps with the dx9 sdk installed.


:::: [ Triple Buffer V2.0 ] ::::
[size=2]aliak.net
DrunkenHyena
DrunkenHyena
At the Bloodshed site ( http://www.bloodshed.net/dev/packages/index.html ) you can download the DX8 for Dev-C++ package. Did you download that?
The example code is based off of mine, which shows they have good taste.


Stay Casual,

Ken
Drunken Hyena
Stay Casual,KenDrunken Hyena</FON

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.