-
Notifications
You must be signed in to change notification settings - Fork 4
nfRendererDemo Description
One of the main applications used to test nfEngine's rendering backends is nfRendererDemo. The program consists of simple scenes, which test different Renderer interfaces and backends. It is a key component to verify whether Renderer interfaces are fully operational. It is also designed to be used as a point of reference when writing new Renderer backend.
- Up/Down Arrow - switch current Subscene. Up Arrow selects more complex one, Down Arrow selects less complex one.
- Left/Right Arrow - switch current Scene. Right Arrow increases Scene ID, Left Arrow decreases Scene ID.
In case newly selected Scene/Subscene is unavailable, appropriate message will be displayed on console screen and on Window title. Currently selected Scene/Subscene are written on Window title.
The application is divided into scenes. Each of these present different details and check different group of interfaces in selected Renderer backend. Additionally, each of the scenes are split into subscenes - these are designed to add subsequent features to currently working ones.
The application after launch automatically intializes Scene 0, which the most basic scene. Then, the Demo attempts to initialize each Subscene from this Scene (beginning from most complex one). If initialization fails, less complex subscene is selected and the process is repeated. If no subscene is working, application exits. Finished and perfectly working Renderer backend will have all Scenes and their Subscenes available.
After a subscene is successfully initialized, it is displayed on application window and user can switch between available Subscenes and Scenes. When user decides to switch current Scene or Subscene, the app will attempt to initialize it and switch to it (if initialization succeeds), or nothing will change and the app will stay at current scene (if newly selected one couldn't be initialized).
Following Scenes and Subscenes are currently available:
This is the most basic Scene. It is designed to test basic Renderer interfaces during early development process of new Renderer Backend. At main Scene initialization, Render Target and Backbuffer are initialized. Afterwards, each scene adds a new Renderer feature to the pool. It is divided into following subscenes:
- Empty with SSO - Compiles Shaders with Separate Shader Object method (aka. using Shader's mix-and-match algorithm). The subscene (even though it is the first one) is not the most basic one. SSO will probably be removed soon together with this subscene, so it is here only to test some legacy designs of nfEngine. Empty screen should be visible.
- Empty - Compiles Shaders using Shader Program method. This is the most basic scene, and should be an entry point during new Backend development. Empty screen should be visible.
- Vertex Buffer - Adds Vertex Buffer initialization to previous Subscene. Two triangles should be visible.
- Index Buffer - Adds Index Buffer initialization and indexed rendering to previous Subscene. A colored triangle and quad should be visible.
- Constant Buffer - Adds Constant Buffer initialization to previous Subscene. Triangle and quad should rotate counter-clockwise.
- Texture - Adds Texture support to previous Subscene. The triangle should be checked.
Moreover, the Scene attempts to initialize a Blend State. If the initialization succeeds, triangle should blend with second triangle, or with the quad.
The Scene is designed to test Depth Buffer and Stencil Buffer support in Renderer backends. The Scene uses a lot of interfaces tested on Basic Scene, so implementing entire Basic Scene support is crucial before progressing to this Scene. It consists of following Subscenes:
- No Depth Buffer - Entry point for this Scene. All required resources, except for Depth Buffer and Stencil Buffer are initialized. A rotating cube on a floor should be visible (however, due to lack of Depth Buffer support, standard depth-related glitches should be visible).
- Depth Buffer - Adds Depth Buffer support to previous Subscene. Depth-related glitches should not occur anymore.
- Depth Stencil Buffer - Adds Stencil Buffer support to previous Subscene. Floor should begin reflecting what is above it.
- Home
- Features
- Development
- Test applications
- nfCommon Documentation
- nfCore Documentation
- Meeting summaries