Sign in to follow this  
Ksingh30

Graphics engines.

Recommended Posts

Ksingh30    100
just curious. professional graphics engines that use DirectX. Are they done similarily as the books show you how to do it. for example for lighting. do the use the D3DLIGHT9 struct or do they do everything from scratch. just curious.

Share this post


Link to post
Share on other sites
circlesoft    1178
Even though books provide an introduction to DirectX (some better than others), many do not teach you the fundamentals of engine programming. And the small "engines" put together by the authors are generally very small and unflexible. I have found the engine programming isn't really a thing that you can just learn from books or articles or tutorials - it is a craft - a mindset - that you have to develop through trial and error. I have halted the implementation of many projects, not only because of design flaws, but because my outlook on a specific problem had evolved. At the time, it was frustrating, but it is an invaluable learning experience.

To answer your question specifically, no, I would say very, very few engines still use D3DLIGHT9 at this point. The reason is because D3DLIGHT9 is a fixed-function pipeline construct. Since everyone uses the programmable pipeline now, there is no need for it.

Share this post


Link to post
Share on other sites
Ksingh30    100
well what I mean was. for example scaling. would they use D3DXMatrixScaling (or similar) or would they write their own function to do the matrrix computation.

Share this post


Link to post
Share on other sites
Hello Ksingh30,
How are you doing?

No, they probably wouldn't rewrite a D3DX function, just because D3DX is just about as fast as you can go. Microsoft had tons of help from Intel and AMD to optimize it like crazy. The only reason they would rewrite it is to go cross-platform. I don't know if OpenGL has matrix functions and the like, I don't know anything about OpenGL.

Chad,
AKA The ProgrammingNerd

Share this post


Link to post
Share on other sites
Moe    1256
Quote:
Original post by Ksingh30
so basically all an engine is, is a set of functions and classes that accomplish a task, for example load a Mesh.

Pretty much. The engine itself really depends on what it is going to be used for. For example, Doom 3 and Far Cry: Doom 3 seems to have more closed in corridors while Far Cry was designed more for large open terrain. Depending on how an engine is written, it will have different strengths/weaknesses. The engine really ought to be a way of presenting graphics/sounds. The actual gameplay code ought to determine how the logic of the game works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this