Jump to content
  • Advertisement

Archived

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

DmGoober

All your D3D problems solved -- in one post!

This topic is 6419 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

Ok my subject is a bit of an exagerration, but this post will explain vague solutions to the following: 1) Loading a mesh from a file, including framehierarchy information. 2) Rendering a mesh, using textures and alpha values. 3) Writing stable D3D programs that have input loops, allow the window to be resized and allow for fullscreen, without crashing. 4) Allow for menus. 5) Allow for text to be displayed. 6) How to write a real program using d3d. Do you wanna know how to do all of this? There are three basically undocumented files that demonstrate, very simply how to do this, all of which come with DX8 SDK. They are: d3dfile.cpp and d3dapp.cpp and pick.cpp. The first two can be found in: \mssdk\samples\Multimedia\Common\src. For some reason, the DX8 helpfile glosses over these files. I will explain them briefly. d3dfile.cpp is simply a wrapper class to id3dxmesh. However, it shows you realistically how to use id3dxmesh while avoiding using COM. You can uses CD3Dmesh to load .x files without hierarchies, CD3dFrame for meshes with matrices and hierarchies, and Cd3dfile for loading cd3dframes from file. d3dapp.cpp is a nifty class that essentially represents a program. Winmain calls CD3DApplication.create() then CD3DApplication.run() and the class does everything else. This class allows: 1) Windowed and full screen modes 2) menu functions to allow for changing resolutions on the fly (this is very important -- remember to init, restore, invalidate, destroy all device objects) 3) rendering and input loops. pick.cpp is a simple example that uses Cmyd3dapplication that derives from cd3dapplication. It loads a tiger mesh and allows the user to pick faces of the mesh. It also demonstrates displaying text to a d3ddevice. I hope this helps! DmGoober Edited by - DmGoober on 11/24/00 10:46:05 AM

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
push''s this one back up sincs its so good.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!