|
-
Aug 4th, 2002, 06:42 PM
#1
Thread Starter
Lively Member
Directx And Vb + Win Api And Vb
Hi all
This is to help. DirectX is so very powerful when it comes to graphical program development that it blows your socks off.
Why dont more people use it? Here is some source code:
D3DXMatrixLookAtLH matView, MakeVector(CameraPos.x, CameraPos.y, CameraPos.z), MakeVector(0, 0, 0), MakeVector(0, 1, 0)
D3Ddevice.SetTransform D3DTS_VIEW, matView
D3DXMatrixPerspectiveFovLH matProjection, PI / 3, 0.75, 0.1, 10000
D3Ddevice.SetTransform D3DTS_PROJECTION, matProjection
Scared yet? I am, I am really pooing my pants right now!
Now I need to unscare you else u wont eva use DirectX and u will be missing out on the real power.
Well basically, a lot of that menaningless rubbish above is just function calls. The 'real code' is in those functions. All u need to know is what the functions do roughly and what they are called so that u can use them and call them.
The scariest thing about DirectX is learning them all and wot they do. There r a hell of a lot. But thats where dedication comes in.
U will love me for this next bit.
Here is a link to the best DirectX code eva. No Im not plugging it hell i dont even know who Simon Price is all I know is that he writes some darn good code.
http://www.planetsourcecode.com/vb/s...earch&lngWId=1
Stick that in your web brower and smoke it!
Wen the page opens up click the first link to the beginners tutorial. U will now see the tutorial. U must have the DirectX SDK (Software Development Kit) on your computer to use this VB code (www.microsoft.com). Just stick all the code behind one form and read the tutorial code comments before running the application.
Beware! One line is commented out by accident. If u run the program u will get an error until u uncomment it out. Also u will need to stick a bitmap called texture.bmp and a wave file called sound.wav in the project directory. any old bitmap and wave file will do just rename them.
This tutorial really is as easy as it gets. Work through it over and over and muck around with some sttings.
Wen I say work through it do it however best suits you. Myself I look at each line and work out wot it is doing or at least attempt to.
Wen I am more confident I actually start writing a little code by myself without looking, etc.
I rekon if u work through it 10 times (like I am right now) u will be able to make some real amazing programs. None of this 2D poo poo we are talking some stunning graphical effects here at high speed.
So are you dedicated to learning this. I am I have to do it for final year project of a degree in Computing. If u are serious as well then please email me on '[email protected]'. It could make it easier if I work together wiv some1 on this baby!
About the Windows API! I used to use it a lot and Im not saying it sucks. All I will say is that it is nowhere near as powerful for stunning graphical effects as DirectX and in many ways it is a lot more complex too wen used for that purpose.
I do like using some API functions myself such as GetTickCount so I aint knocking it.
A quick help for API users. U should know this but if u do not u have to learn this. Find the API text viewer on the start menu (amongst the MS Visual Studio 6 stuff) and wen it has launched load the win32api file. The text viewer makes writing functions definitions a copy and paste operation it is also useful since u have a list of nearly all API functions at ur fingertips.
Well if this has helped some1 i have achieved my goal. Remember wivout learning u wont get anywhere so get ready to learn and u will be fine. First time thru the tutorial = scary. Second time = not so bad. By the fifth time u r getting to know stuff. Use the SDK to learn a little about some functions each time through. This stuff is used all the time so wen u know it u wont need to learn it again. U will be whooping out DirectX code like u were Mr. Microsoft himself.
Well good luck all and if there r any people who want a friend in DirectX code Im ur man.
Catch u soon and all the best to u all. I rekon u all can do it its just commitment that really matters.
All the best
Dan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|