NuiLab / code-vr

🐍 Program and explore real applications with virtual reality! Learn how to program, compete to build apps, and even collaborate with other people in realtime, in game or not!
MIT License
147 stars 13 forks source link

Rendering System #9

Open alaingalvan opened 7 years ago

alaingalvan commented 7 years ago

CodeVR's Vulkan Renderer

The following is the start of some discussion on the Rendering System Pull Request #5.

CodeVR's renderer is modeled after a centralized graphics state store, which is laid out similarly to the GLTF specification.

The renderer is an API specific class that follows the AbstractRenderer trait, that takes a GraphicsState object, and creates API specific data structures from that state from its own handles, and renders the state using the graphics API of choice.

Multiple Actors, 1 Graphics State

There's a large number of actors in a scene, each writing to the engine's state. Each could queue a request to the scene graph to add or remove an actor, each could add a construct to the graphics state, or a physics construct to the physics world, etc.