Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualturch

Posted 03 February 2012 - 08:04 AM

Why don't you write a visitor that extracts all the Graphics data you need for drawing and pass the list of those objects to the renderer. In that way all you renderer would ever see would be a RenderObject or DrawableObject with the information it needs, like material, textures, vbs and ibs or sprites.


^^

At a low level, everything you can draw boils down to vertex / index information, shaders, and shader parameters. Each subsystem (geometry, sprites, particles, etc.) can ectract this information in an api-independent way and pass it to the renderer.

Assuming you aren't using the fixed function pipeline. And if you are, why? Posted Image

#1turch

Posted 03 February 2012 - 08:04 AM

Why don't you write a visitor that extracts all the Graphics data you need for drawing and pass the list of those objects to the renderer. In that way all you renderer would ever see would be a RenderObject or DrawableObject with the information it needs, like material, textures, vbs and ibs or sprites.


^^

At a low level, everything you can draw boils down to vertex / index information, shaders, and shader parameters. Each subsystem (geometry, sprites, particles, etc.) can ectract this information in an api-independent way and pass it to the renderer.

Assuming you aren't using the fixed function pipeline. And if you are, why?

PARTNERS