Jump to content
  • Advertisement
Sign in to follow this  

New to DirectX, Some Questions

This topic is 4831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have been working on an classes which I plan to integrate into direct3d. Basically, the only reason I want Direct3d is so I can get access to hardware such as the video card, and use it to store textures and other files. I also obviously want to take advantage of Direct3d's low level drawing. But since I am new I want to keep things very simple for now. I'm just looking for something other than the Windows GDI to test my own 3d algorithms on. If some of you could explain to me the simplest ways in which I can take advantage of Direct3d's connection to hardware and its low level rendering, that would be awesome. Basically, I have a Camera class and a Vertice class and a few other various classes. The Vertice class's GetTwoD () function returns a CPoint of the 2d Coordinates of a given Vertice object (3d point) in space relative to a given Camera object's info. What I want to do is make a set of classes on my own that only use a draw pixel function to build the entire game world out of, and ideally use Direct3d only to draw pixels at a low level and store bitmap data. The reason I did this was so I can see all of the functions and all of the process involved in the rendering to put it quite simply. I don't mind if things will be slow, I'm just looking for something faster than the GDI, afterall. I'm much more interested in theory and raw alogorithms right now than practicality. One problem I have encountered is that I cannot get CPoints working with my DirectX code. I'm using Visual Basic 6.0 and I get a "cannot open file "nafxcwd.lib" error wherever I put "include <afxwin.h>". Everything looks right under Tools->Options->Directories, with MFC/include and MFC/libs at the top. If someone could help me out with this error that would be nice. Though I hate to ask for code, I think I probably should at this point. If someone could perhaps give me a DirectX simple setup that can use CPoints ok, and could maybe explain quickly how things should be passed into Object functions for them to be able to handle DirectX pixel drawing (though I don't think that should be much trouble), I would be extremely thankful. My email is occsdude2003@yahoo.com. [Edited by - OCcsdude on August 23, 2005 8:18:21 PM]

Share this post

Link to post
Share on other sites
Hi there OCcsdude,
Ho are you doing?

The Problem
New to DirectX and seeking help with Direct3D.

The Solution
OCcsdude, May I suggest the following... in learning Direct3D...
Play with the simple features first like rendering triangles etc... this may seem boring at first but will help you in the long run by understanding how direct3d works and why it does things a certain way.

A simple map to learning would be,

1)Setup a simple window.
2)Render a triangle
3)Render some meshes
4)Play with some lights and materials
5)Play with Textures

From this point on you will know the basics which will help you to take advantage of some of the features that Direct3D exposes to you. You cannot just simple take advantage of the Hardware, You need to draw/render objects through Direct3D's API as Direct3D gives you access to the HAL (Hardware Abstraction Layer) that gives you the functionality to take advantage of the hardware.

I really hope this helps.
Take care buddy.

PS: Sorry if the answer is not what you seek.

Share this post

Link to post
Share on other sites
It sounds like you are writing a software renderer - in which case Direct3D isn't going to help you. It would help you if you wanted it to rasterize triangles, or do the transformations but you don't seem to want to do that.
You could use DirectDraw and get direct access to the framebuffer, but as you will be just locking/writing you probably won't get that much more speed than using GDI to write directly to a bitmap and then blitting it to a window.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!