Jump to content
  • Advertisement
Sign in to follow this  
InsaneBoarder234

2 Questions: Missing D3D Framework + Multiple Direct3D Devices

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

Please forgive me if I'm asking stupid questions as I am still a newbie with Direct3D, a little help here will help to get me away from this stage and away from asking newbie questions :) Firstly, I am reading the book "Strategy Game Programming With DirectX9" and a lot of the examples use the Direct3D framework (d3dapp.cpp, d3denumeration.cpp, d3dfont.cpp, d3dsettings.cpp, d3dutil.cpp, dxutil.cpp). These files are apparantly in the path "DXSDK_Base\Samples\C++\Common" but they don't seem to be anywhere on my computer let alone in the DX9 SDK installation directory. Due to me not having these files I cannot compile the example source code from the book. I have the October 2004 version of the SDK because I heard it is the last version that supports Visual C++ 6 and the writer of this book says the code is compatible with VC6 and not VS.NET. Can anyone send me these files or tell me where I can download them please? Thanks very much! :) Secondly, I wanted to ask if it is possible to use several Direct3D devices in one program. So for example in a 2D map editor program that uses D3D to render tiles, could i have one Direct3D device control rendering of a tileset to one window and another device control rendering of the tile map to another window? Or would I have to use a single Direct3D device for all rendering in the application? Again, thanks very much for any help i receive.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by InsaneBoarder234
Firstly, I am reading the book "Strategy Game Programming With DirectX9" and a lot of the examples use the Direct3D framework (d3dapp.cpp, d3denumeration.cpp, d3dfont.cpp, d3dsettings.cpp, d3dutil.cpp, dxutil.cpp). These files are apparantly in the path "DXSDK_Base\Samples\C++\Common" but they don't seem to be anywhere on my computer let alone in the DX9 SDK installation directory.

I don't know of the book you mention, but what is it's publishing date?

The SDK framework has changes several times, so it is quite possible that the book is referring to out-of-date material. In my experience, these books have a copy of the DXSDK on their accompanying CD (does your book have one?) - uninstall whatever you have, and install the version from the book's CD. If you still dont have those files, you bought a bad book [smile]

Quote:
Original post by InsaneBoarder234
Secondly, I wanted to ask if it is possible to use several Direct3D devices in one program. So for example in a 2D map editor program that uses D3D to render tiles, could i have one Direct3D device control rendering of a tileset to one window and another device control rendering of the tile map to another window? Or would I have to use a single Direct3D device for all rendering in the application?

As far as I've used it, you can have any number of windowed-mode devices pointing at different targets. However, it's crucial to appreciate that you cannot share any resources between them - 4 similar devices means 4 of each shared resource. You might well want to do some research into swap chains - I wrote a 3DSMax style 4-viewport editor in VB6 some years ago, and the swap chain mechanism allowed me to specify multiple windows and PictureBox controls for each instance.

hth
Jack

Share this post


Link to post
Share on other sites
Hi, thanks for your reply. The CD with the book contains the summer 2003 version of the DirectX SDK so I'll install that later so i can have a play with the example source code.

The books publishing date is July 2003 and its ISBN is 1556229224. It seems to have a lot of bad reviews also. Although I never saw these before I bought it and so far it seems ok to me (keep in mind that I'm a newbie with Direct3D and game programming :))

Share this post


Link to post
Share on other sites
Quote:
Original post by InsaneBoarder234
The CD with the book contains the summer 2003 version of the DirectX SDK so I'll install that later so i can have a play with the example source code.


I'd give the Summer-2003 version a go... obviously it's fairly old, so be a bit careful when using it for learning purposes [wink].

As mentioned before, the files you mention are part of the SDK Framework and I'm pretty sure they've changed at least a couple of times since the first DX9 release.

hth
Jack

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!