Jump to content
  • Advertisement
Sign in to follow this  

Any reading on renderer design (or just on how to design systems)?

This topic is 2754 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 soon going to need to write a renderer class for my really slowly advancing skill enhancing project (openGL), do you have any online tutorials or threads that talk about renderer design/architecture, or just overall how to design good classes and systems (i can convert knowledge from either to the other one so it doesnt really matter)?

This is what i would currently do:

1.Have openGL resources that the renderer creates and gives a id/pointer to (that is, buffer, texture, shader and any metadata about them)

2.You put the data to a mesh/material and register that and you get a pointer to that too

3.You mark it to be rendered each frame

4.You tell the renderer to render everything

That would allow a scene manager or something to upload the data of stuff, mark them to be rendered or not based on visibility, and then tell the renderer to draw everything. Or in other words, first you call SceneManager.DetermineVisibleObjects() and then Renderer.DrawFrame() to draw the scene (or something similiar)

What i dont like in that is the id's/pointers being passed around. It would be nice if they were objects of some sort. Also im unsure about the renderer and scenemanager being kind of tied together, i might want something inbetween to ask scenemanager for visible objects and then figure out their corresponding renderable objects.

So instead it would be:

for each currently visible renderable
ask if the corresponding thing in scenemanager is visible and if not mark as not visible
for each scene manager object that became visible this frame
mark corresponging renderer object as visible

So now the scenemanager doesnt need to care if its objects are rendered or not, and the renderer doesnt need to know about scenemanager.

So, post related threads, tutorials or articles or just comment these systems i considered and tell me how to improve them :3


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!