Jump to content
  • Advertisement


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


Why do it this way?

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

I am working from the book Real-Time Rendering Tricks and Techniques in DirectX. In the book the basic framework to set up a window and directx is split into a class and various header and cpp files. Now I am also using M.S''s tutorials and I am working with the first program called CreateDevice.cpp in the SDK. This has all the code in one file. My first question is obviously which way is more easier to understand and learn with, which way is more effecient and in general which way do most people work with. My second query relates to this peice of code, long EnumerateModes (D3DDISPLAYMODE *pModes, long ModeCount); I am thinking this is a function prototype to the function EnumerateModes. I basically do not understand what the point is in working this way. Pk

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I have the same book! Excellent material.

Your question about which way is easier to work with is subjective. See, Kelly has an object orientated approach, which is great for C++ and large system programmers.

For demo purposes, most people want to read a direct, to-the-point example, especially when the example has little documentation behind it.

The book goes into detail about techniques before showing the code that implements them.

In my case, I''m skipping the initialization stuff and simply reading the techniques for specific techniques. I''ve already written my own skeleton for initializing and using the API.

The answer to your question about the function:
long EnumerateModes (D3DDISPLAYMODE *pModes, long ModeCount);

is that *pmodes is a pointer to a structure for the supported modes to be filled with. I believe that the long returned is the count of modes availiable, and the modecount sent is the max modes the structure can hold. But that is a guess.

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.

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!