![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
Renderer interface. More...
Renderer interface.
Renderer classes implementing this interface must fully conform to the method specifications written in the comments.
Basically a renderer class implementing this interface defines a rendering path.
Definition at line 55 of file PureIRenderer.h.
#include <PureIRenderer.h>
Public Member Functions | |
virtual TPureUInt | initialize (TPureUInt width, TPureUInt height, TPURE_DISPLAY_MODES dmode, TPureUInt freq, TPureInt cdepth, TPureInt zdepth, TPureInt stencil, TPureInt samples, HWND window=NULL)=0 |
Initializes the renderer. | |
virtual TPureBool | shutdown ()=0 |
This stops the renderer. | |
virtual TPureBool | isInitialized () const =0 |
Gets the state of the renderer. | |
virtual void | SetManagers (PureObject3DManager *_objmgr, PureUiManager *_uimgr, PureCamera *_cam)=0 |
This should be called after initialization, prior to first call to RenderScene(). | |
virtual void | RenderObject (PureObject3D &object)=0 |
Renders the given object. | |
virtual void | RenderScene ()=0 |
Renders the scene. | |
virtual const TPURE_RENDER_HINT & | getRenderHints ()=0 |
Get current render hints. | |
virtual void | SetRenderHints (const TPURE_RENDER_HINT &hints)=0 |
Set current render hints. | |
virtual void | ResetStatistics ()=0 |
Resets "Current Statistics". | |
virtual void | WriteStats () const =0 |
Writes "Current Statistics" and "Last Frame Statistics" to the console window. | |
|
pure virtual |
Get current render hints.
Render hints are basically debug settings for the renderer used in rare circumstances. The available render hints are documented at each renderer implementation.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.
|
pure virtual |
Initializes the renderer.
Tries to set the given display mode. Render hints are not affected.
width | Client width of the window being created. If 0, the target width will be the current horizontal screen resolution. If the current horizontal screen resolution can't be queried, the target width will be 800. |
height | Height of the window being created. If 0, the target height will be the current vertical screen resolution. If the current vertical screen resolution can't be queried, the target height will be 600. |
dmode | Display mode to be set. |
freq | The refresh rate to be set. If 0, the highest possible will be set at the given resolution. Ignored in windowed mode. |
cdepth | The color depth to be set. Ignored in windowed mode. |
zdepth | The Z-buffer-depth to be set. Can be 32, 24 or 16. If 32 doesn't work, it tries 24, finally 16, before stopping with error. |
stencil | The stencil buffer depth to be set. 0 means 0, any other value means 8. |
samples | The level of antialiasing, < 2 means no AA thus no sample buffers, 2 means 2x AA, 4 means 4x AA, and so on ... |
window | If a target window is already created for rendering purpose, it can be specified here. To be used for legacy reasons only. |
Implemented in PureRendererHWfixedPipeImpl, PureRendererSWincremental, and PureRendererSWincrementalImpl.
|
pure virtual |
Gets the state of the renderer.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.
|
pure virtual |
Renders the given object.
No effect if the engine is not initialized.
Implemented in PureRendererHWfixedPipe, PureRendererHWfixedPipeImpl, PureRendererSWincremental, and PureRendererSWincrementalImpl.
|
pure virtual |
Renders the scene.
No effect if the engine is not initialized. Note that the first call to this function might not result in actually producing picture of the scene, because the implementing renderer might use "feedback mode" which means that the geometry is transformed into feedback buffer for debugging purposes, and rasterization is not happening. This is true only for newly created objects though, which are rendered for the first time.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.
|
pure virtual |
Resets "Current Statistics".
The renderer might collect statistical data during its lifetime or for a shorter period, that might be shown in debug log by WriteStats(). In any circumstances you want to reset this data i.e. restart measurements, this function does the job. If logging is enabled, it also logs statistics.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.
|
pure virtual |
This should be called after initialization, prior to first call to RenderScene().
This is because these managers may depend on the initialization status of the renderer.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.
|
pure virtual |
Set current render hints.
Render hints are basically debug settings for the renderer used in rare circumstances. The available render hints are documented at each renderer implementation.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.
|
pure virtual |
This stops the renderer.
Deletes everything created by the renderer. No effect before initialization. After shutdown, initialize() can be called again. Render hints are not affected.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.
|
pure virtual |
Writes "Current Statistics" and "Last Frame Statistics" to the console window.
These are explained at Debugging.
Implemented in PureRendererHWfixedPipeImpl, and PureRendererSWincrementalImpl.