Archived

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

kaos2000

D3D intergration

Recommended Posts

i started building a little 3d engine just for fun but i decided i will make it into a project. i started out that it would load the renderer from a dll or linked, but i am also still new to game programing and this is being done alone so i started intergrating D3D into the engine(Math lighting ....) this could come back to haunt me.I wanted to ask if anyone has gone down this path and decided it was a big no no

Share this post


Link to post
Share on other sites
Suggestion: don''t do it on your first 3D engine. Making a good multi-API engine requires quite some experience. If you already started a small engine with D3D, then finish it using pure D3D. Then do the same thing with any other API you''d like to include later. You have to fully understand each API by itself, before intergrating them together. Each one has it''s own concepts, that are mutually incompatible most of the time. Although functionality is very similar eg. between D3D and OGL, there are lots of small (but vital) details to consider. Otherwise, you''ll find yourself modifying the base render interface everytime you include a new feature in one of the DLLs, and you''ll end up with a total unusable mess.

That said, if you develop a multi-API engine, then using part of an API in the base engine is a big no-no. D3D calls should only be used in the D3D render dll, OpenGL calls only in the OpenGL dll, etc. If you are mixing either D3D or OGL calls into the base engine itself, then you are asking for (huge) trouble.

/ Yann

Share this post


Link to post
Share on other sites