Archived

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

saxybrian

Total Newb

Recommended Posts

Howdy, I''m getting back into programming after a few years off, and I''m trying to teach my self, DirectX graphics. Right now, I want to make a basic program that will set the screen to graphics mode and draw a single pixel on the screen. At the moment, I''m using Microsoft Visual Studio 6.0 and have no touched any of the compiler settings. I tried to do a few cut/pastes from some of the sites i''ve seen but all I get are build errors when I attempt to build the program. If anyone could post some source code in here or at least link me to a program of something this simple I would GREATLY appriecate it.

Share this post


Link to post
Share on other sites
Hi, I am using also Visual c++ 6.0 and DirectX, so I think I can help you a bit. Here's something I recommend you to do:

goto:
http://www.andypike.com/tutorials/directx8/001.asp

You can download the sources or go through code by hand.

Changes in the source are needed, if you use DX 9.0:
Goto Project->Settings->Link and change d3d8.lib -> d3d9.lib

in source change all occurrences of DX8 to DX9:
d3d8.h -> d3d9.h
LPDIRECT3D8 -> LPDIRECT3D9
LPDIRECT3DDEVICE8 -> LPDIRECT3DDEVICE9
Direct3DCreate8 -> Direct3DCreate9

change
d3dpp.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC;
--> d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;

and TADAA You got yourself a green screen if everything went okay.

This is the very place where I got myself a grab on directx programming. It's not hard after you understand the principles, I also recommend you to read the SDK.
(in sdk you can find topic "Converting to DirectX 9.0" and there is all information needed to make all those tutorials at AndyPike.com work)

If you need any help with the following tutorials, just ask.

I hope that you succeed getting some concrete done this way and get encouraged to continue.

Vikke Matikainen


[edited by - kosmo on March 4, 2003 6:14:04 AM]

[edited by - kosmo on March 4, 2003 6:16:00 AM]

Share this post


Link to post
Share on other sites