Jump to content
  • Advertisement
Sign in to follow this  
h3ro

Designing a rendering system.

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

Hey. Im about to start a new project and I am wondering how I should structure my rendering code. In my older projects I have had a Render class that is implemented as a singleton. That class has had all the information about how to render and what to render. Basically it worked like this: // Load int modelID = render.load3DMesh("path"); // Render render.clearBuffers(); render.setRenderCamera(m_currentCamera); render.render(modelID); The system is very easy to implement and it works fine, but i have found it to not be that good when wanting to do shaders and other interesting rendering effects. How are you handling your rendering code? Any good articles? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
You might want to consider seperating your loading code from the actual rendering code. Maybe introduce some kind of resource manager that is responsable for loading the assets (in your case the 3d mesh) and let the render class be responsable for all (or some of) the render work.

You also might want to look at some open source projects such as Ogre and Irrlicht for some inspiration.

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.

GameDev.net 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!