All rendering handled on separate thread
Generate rendering commands that can be sorted later
http://realtimecollisiondetection.net/blog/?p=86
Rendering system has a list of delegates it calls into. Put the id of the delegate in the command so that the renderer can reference it.
When applying materials, really just apply a diff from the previous state. This way you’re only changing what needs to be changed (texture, blend func, etc.)
Can do the same diff for shader parameters
For now, just use the queue in-order
Generate render commands (clear screen)
don’t have to sort on material itself, can sort on texture since Qi is deferred (always uses the same shader during the main pass)
Double buffer the object's data so that the renderer and engine can work on them at the same time, then swap them at some time.
Create renderer-only versions of the rendered data which is used only be the renderer. The engine copies all necessary data to the renderer before kicking the render thread.
Note that luminance can be computed by doing a dot product with the RGB and vec3(0.3, 0.59, 0.11). These values from the NTSC standard for B&W televisions.
All rendering handled on separate thread Generate rendering commands that can be sorted later http://realtimecollisiondetection.net/blog/?p=86 Rendering system has a list of delegates it calls into. Put the id of the delegate in the command so that the renderer can reference it. When applying materials, really just apply a diff from the previous state. This way you’re only changing what needs to be changed (texture, blend func, etc.) Can do the same diff for shader parameters For now, just use the queue in-order Generate render commands (clear screen) don’t have to sort on material itself, can sort on texture since Qi is deferred (always uses the same shader during the main pass)