Sign in to follow this  
Spannen

Basic design for a renderer?

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
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

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