Jump to content
  • Advertisement
Sign in to follow this  
Spannen

Basic design for a renderer?

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

Hi, Ive been looking for some guidelines on how to design (class design mostly) a renderer. I want to be able to load models and scenes, have support for shaders/materials and later add physics. I have tried to google but didnt come up with anything, also looked in different forums. Can any of you point me to some tutorial or good reading on this subject? I'm looking for information on how to organize everything and make the high level structure of a renderer, for it to be efficient and easy to extend with new features. Im planning on using DirectX..

Share this post


Link to post
Share on other sites
Advertisement
Well I liked this info on scene-graph design: http://www.realityprime.com/articles/scenegraphs-past-present-and-future.
With my current project I have gone for seperating object data into seperate graphs for seperate uses (transform, collision, rendering).
For my renderer design I try to seperate rendering logic from the renderable types themselves. i.e. no virtual Renderable::draw() function. This allows different rendering techniques to be more easily swapped in and out.
My basic structure is to have RenderStages, which encapsulate a specific stage of the render (e.g. geometry drawing, rendering to a texture, post process effects). These can have various attributes attached (camera to draw from, fbo to draw to, lists which include or exclude particular geometry from the render). I then pass them into my renderer and draw them in order.
There is rather a lack of good info on designing a rendering system as a whole (at least in my experience).

Share this post


Link to post
Share on other sites
A little while back I wrote up a short design document on my rendering system. It may or may not be what you are looking for, but it may give you some worth-while ideas. You could also check out the wild magic engine and books for a thorough treatment of the topic.

Keep in mind that you may well want to change things as you go along, so don't sweat every little detail before you get something implemented...

Share this post


Link to post
Share on other sites
Thanks! Both the scene graph article and the design document seem helpful. I've yet to read them thoroughly though :)

Share this post


Link to post
Share on other sites
The links in this blog post could be handy:

http://diaryofagraphicsprogrammer.blogspot.com/2009/01/handling-scene-geometry.html

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!