Advertisement Jump to content


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


game engine graphics

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

Aside form all the OpenGl vs D3D hoopla what is the structure of general graphics engine? As a newcomer I want to start a basic engine but have found the graphics side to be the most challenging part of it. Is it beter to have a centeralized class where you pass an object to a draw function or equip each object with its own drawing function so it is self reliant? And what are some pitfalls you have found in terms of basic graphics programming?

Share this post

Link to post
Share on other sites
Just start working on something. Along the way, you`ll necessarilly rewrite the class structure several times to suit your needs better. Whatever design you make at the beginning, there is a border after which the adding of another feature clutters the code and makes it hard to maintain.
Just start with some import of the objects from some modelling program, add some multitexturing, lighting, animation, collision detection,shaders,frustum culling and you`ll realize there were hundreds of things you had no idea about when you started designing your engine class hierarchy.
That`s life, fortunately that`s the fun part, when you`re learning new stuff from C++ (STL,Namespaces,...) and designing your classes around it while rewriting existing portions of code.
Just Do It.

Avenger 3D game (Last update MAR-26)

Share this post

Link to post
Share on other sites
I''ve learned to love managers, that is, appending anything to a class by sending in a filled structure of "attributes" and having it take care of everything for me (collision, updating, rendering). It gets pushed into a linked list of similar objects depending on the manager and attributes it can accept (entities in model representation form, textures, world effects, projectiles, 3d sound effects, misc particle effects). It returns a pointer to the object after it has been added, in order to send that same pointer in for manipulation when needed at any time. Make the managers powerful, and it makes your code much easier to maintain. Then you won''t really have to worry about making a class for this, a class for that, rendering this, updating that. Just add attributes to whichever manager and start feeding it the new features, go nuts over it too, you''ll find it to be much easier this way.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!