Rendering Command Implementation Notes
The output of the state sorting stage is a large list of the individual
commands that are to be rendered using OpenGL or OpenAL. In this document we
describe the various sets of commands and the order that they can be expected
in, so that implementations can be coded to work with it. Each of these
commands are represented by constants defined in the
org.j3d.aviatrix3d.pipeline.RenderOps interface.
Single Layer
Corresponds scene graph that has a single layer and single viewport with no
layers in the viewport, and no transparent objects, lights, fog etc.
START_VIEWPORT
START_LAYER
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_LAYER
STOP_VIEWPORT
Multiple Layers
Corresponds scene graph that has a multiple layers each with a single viewport
with no layers in the viewport, and no transparent objects, lights, fog etc.
START_VIEWPORT
START_LAYER
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_LAYER
STOP_VIEWPORT
START_VIEWPORT
START_LAYER
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_LAYER
STOP_VIEWPORT
- ... for however many layers
Multiple Viewports in a single layer
Corresponds scene graph that has a single layer containing multiple viewports
with no layers in the viewports, and no transparent objects, lights, fog etc.
START_VIEWPORT
START_LAYER
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_LAYER
STOP_VIEWPORT
START_VIEWPORT
START_LAYER
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_LAYER
STOP_VIEWPORT
This pattern repeats per layer, so if you have multple layers with multiple
viewports, you'll see the same pattern repeated for each successive layer.
Multipass Rendering
Corresponds scene graph that has a single layer and single viewport with no
layers in the viewport. The viewport contains a multipass scene with 2 rendering
passes (though it can be generalised to n passes, with no transparent
objects, lights, fog etc.
START_VIEWPORT
START_LAYER
START_MULTIPASS
START_MULTIPASS_STATE (for up to 4 different buffers)
START_MULTIPASS_PASS
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_MULTIPASS_PASS
STOP_MULTIPASS_STATE (for up to 4 different buffers)
CHANGE_MULTIPASS_STATE (for up to 4 different buffers)
START_MULTIPASS_STATE (for up to 4 different buffers)
START_MULTIPASS_PASS
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_MULTIPASS_PASS
STOP_MULTIPASS_STATE (for up to 4 different buffers)
STOP_LAYER
STOP_VIEWPORT
Combined Multipass and Single Pass Rendering
Corresponds scene graph that has a two layers: The first containing a single pass
render and the second containing a multipass render. The second layer contains a
multipass scene with 2 rendering passes (though it can be generalised to
n passes, with no transparent objects, lights, fog etc.
START_VIEWPORT
START_LAYER
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_LAYER
START_LAYER
STOP_VIEWPORT
START_VIEWPORT
START_MULTIPASS
START_MULTIPASS_STATE (for up to 4 different buffers)
START_MULTIPASS_PASS
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_MULTIPASS_PASS
STOP_MULTIPASS_STATE (for up to 4 different buffers)
CHANGE_MULTIPASS_STATE (for up to 4 different buffers)
START_MULTIPASS_STATE (for up to 4 different buffers)
START_MULTIPASS_PASS
START_RENDER
START_STATE
RENDER_GEOMETRY
STOP_STATE
STOP_RENDER
- continue for as many objects are are in the scene
STOP_MULTIPASS_PASS
STOP_MULTIPASS_STATE (for up to 4 different buffers)
STOP_LAYER
STOP_VIEWPORT
|