![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
Definition at line 30 of file PureRendererSWincremental.cpp.
Public Member Functions | |
virtual | ~PureRendererSWincrementalImpl () |
Calls shutdown(). | |
TPureUInt | initialize (TPureUInt width, TPureUInt height, TPURE_DISPLAY_MODES dmode, TPureUInt freq, TPureInt cdepth, TPureInt zdepth, TPureInt stencil, TPureInt samples, HWND window=NULL) |
Documentation is at public PureRendererSWincremental class definition. | |
TPureBool | shutdown () |
This stops the renderer. | |
TPureBool | isInitialized () const |
Gets the state of the renderer. | |
void | SetManagers (PureObject3DManager *_objmgr, PureUiManager *_uimgr, PureCamera *_cam) |
This should be called after initialization, prior to first call to RenderScene(). | |
void | RenderObject (PureObject3D &object) |
Not implemented. | |
void | RenderScene () |
Renders the scene. | |
const TPURE_RENDER_HINT & | getRenderHints () |
Get current render hints. | |
void | SetRenderHints (const TPURE_RENDER_HINT &hints) |
Set current render hints. | |
void | ResetStatistics () |
Resets "Current Statistics". | |
void | WriteStats () const |
Writes "Current Statistics" and "Last Frame Statistics" to the console window. | |
void | CheckConsistency () const |
Runs an internal consistency test, just for debug. | |
![]() | |
CConsole & | getConsole () const |
Returns access to console preset with logger module name as this class. | |
![]() | |
![]() |
Private Member Functions | |
PureRendererSWincrementalImpl () | |
NULLs members only. | |
PureRendererSWincrementalImpl (PGEcfgProfiles &cfgProfiles, PureWindow &_wnd, PureScreen &_scr, PureHwInfo &_hwinfo) | |
PureRendererSWincrementalImpl (const PureRendererSWincrementalImpl &) | |
PureRendererSWincrementalImpl & | operator= (const PureRendererSWincrementalImpl &) |
void | VertexProcessing (const TXYZ *pVertices, TPureUInt nVertices_h, bool bIndexed, const void *pVertexIndices, TPureUInt nVertexIndices_h, unsigned int nIndicesType, TPURE_TRANSFORMED_VERTEX *pVerticesTransf, const TXYZ &pos, const TXYZ &rot, const TXYZ &scaling, const TXYZ &campos, const TXYZ &camrot) |
Loop over the input vertices and transform them into pVerticesTransf array. | |
void | PrimitiveAssembly (TPURE_TRANSFORMED_VERTEX *pVerticesTransf, TPureUInt nVertexIndices_h, const TXYZ &pos, const TXYZ &rot, const TXYZ &campos, const TXYZ &camrot, TPureInt vp_x, TPureInt vp_y, TPureUInt vp_w, TPureUInt vp_h) |
Loop over the input triangles and throw away those which are outside of the view frustum. | |
void | GeometricStage (const TXYZ *pVertices, TPureUInt nVertices_h, bool bIndexed, const void *pVertexIndices, TPureUInt nVertexIndices_h, unsigned int nIndicesType, TPURE_TRANSFORMED_VERTEX *pVerticesTransf, const TXYZ &pos, const TXYZ &rot, const TXYZ &scaling, const TXYZ &campos, const TXYZ &camrot, TPureInt vp_x, TPureInt vp_y, TPureUInt vp_w, TPureUInt vp_h) |
This should be called for every renderable object. | |
void | RasterStage () |
void | SetPixel (int x, int y, TRGBAUBYTE color, TPureInt vp_x, TPureInt vp_y, TPureUInt vp_w, TPureUInt vp_h) |
void | Line (int x1, int y1, int x2, int y2, TRGBAUBYTE color, TPureInt vp_x, TPureInt vp_y, TPureUInt vp_w, TPureUInt vp_h) |
void | RenderStage (TPureUInt nVertexIndices_h, TPURE_TRANSFORMED_VERTEX *pVerticesTransf, TPureInt vp_x, TPureInt vp_y, TPureUInt vp_w, TPureUInt vp_h) |
This should be called for every renderable object. | |
void | ClearColorBuffer () |
void | BeginRendering () |
Sets viewport size and clears buffers. | |
void | SwitchToPerspectiveProjection () |
Sets perspective projection. | |
void | SwitchToOrtographicProjection () |
Sets orthographic projection. | |
void | Draw3DObjects () |
Draws 3D objects. | |
void | Draw2DObjects () |
Draws 2D objects. | |
void | SyncToScreen () |
void | FinishRendering () |
Forces pending tasks to be finished and displays the rendered picture. | |
void | printFeatureList (const std::string &features, const char *endstring) |
Writes the given list to console. | |
void | printOGLfeatures () |
Writes OGL feature list to console. | |
void | printWGLfeatures () |
Writes WGL feature list to console. | |
Private Attributes | |
TPURE_RENDER_HINT | renderHints |
Render hints. | |
TPureBool | bInited |
PGEcfgProfiles & | m_cfgProfiles |
PureWindow & | wnd |
Our window, where we draw to, singleton. | |
PureHwInfo & | hwInfo |
Hardware infos, singleton. | |
PureScreen & | screen |
Our screen, singleton. | |
PureObject3DManager * | pObject3DMgr |
ObjectManager, at least 1 instance. | |
PureCamera * | pCamera |
Camera, at least 1 instance. | |
PureUiManager * | pUImgr |
UI manager, singleton. | |
TPureBool | bLighting |
HDC | hColorBufferDC |
Memory Device Context for Color Buffer, compatible with wnd's DC. | |
BITMAPINFO | biColorBufferDDB |
Attributes of Color Buffer DIB. | |
HBITMAP | hColorBufferDDB |
Handle to Color Buffer DIB. | |
BYTE * | pColorBufferDIB |
Color buffer. | |
float * | pZBuffer |
Depth buffer. | |
Friends | |
class | PureRendererSWincremental |
Additional Inherited Members | |
![]() | |
static PureRendererSWincremental & | createAndGet (PGEcfgProfiles &cfgProfiles, PureWindow &_wnd, PureScreen &_scr, PureHwInfo &_hwinfo) |
Creates and gets the singleton implementation instance. | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
![]() | |
static const TPURE_RENDER_HINT | DefaultHints = 0 |
Default render hints for PureRendererSWincremental. | |
|
virtual |
Calls shutdown().
Definition at line 187 of file PureRendererSWincremental.cpp.
|
private |
NULLs members only.
Definition at line 432 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 450 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 472 of file PureRendererSWincremental.cpp.
|
private |
Sets viewport size and clears buffers.
Definition at line 874 of file PureRendererSWincremental.cpp.
void PureRendererSWincrementalImpl::CheckConsistency | ( | ) | const |
Runs an internal consistency test, just for debug.
Definition at line 415 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 842 of file PureRendererSWincremental.cpp.
|
private |
Draws 2D objects.
Definition at line 989 of file PureRendererSWincremental.cpp.
|
private |
Draws 3D objects.
Definition at line 903 of file PureRendererSWincremental.cpp.
|
private |
Forces pending tasks to be finished and displays the rendered picture.
Definition at line 1006 of file PureRendererSWincremental.cpp.
|
privatevirtual |
This should be called for every renderable object.
Renderer cannot access private parts of objects. So objects have to provide interface for their input and output data. Input data in this case is the object's base vertices / triangle list selected by LOD. Output data are the vertices / triangle list after vertex processing and primitive assembly. Input data -> VS -> VP -> PA -> Output data.
Implements PureIIncrementalRenderPipeline.
Definition at line 678 of file PureRendererSWincremental.cpp.
|
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.
Implements PureIRenderer.
Definition at line 388 of file PureRendererSWincremental.cpp.
|
virtual |
Documentation is at public PureRendererSWincremental class definition.
Implements PureRendererSWincremental.
Definition at line 196 of file PureRendererSWincremental.cpp.
|
virtual |
Gets the state of the renderer.
Implements PureIRenderer.
Definition at line 350 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 721 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 489 of file PureRendererSWincremental.cpp.
|
private |
Loop over the input triangles and throw away those which are outside of the view frustum.
Transform the rest to screen coordinates.
Transformation is: Clip -> NDC -> Screen coordinate systems.
Definition at line 593 of file PureRendererSWincremental.cpp.
|
private |
Writes the given list to console.
|
private |
Writes OGL feature list to console.
|
private |
Writes WGL feature list to console.
|
private |
|
virtual |
Not implemented.
Use RenderScene() to render all objects.
Implements PureRendererSWincremental.
Definition at line 367 of file PureRendererSWincremental.cpp.
|
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.
Implements PureIRenderer.
Definition at line 373 of file PureRendererSWincremental.cpp.
|
privatevirtual |
This should be called for every renderable object.
Renderer cannot access private parts of objects. So objects have to provide interface for their input and output data. Input data in this case are the fragments after GeometricStage. Output data in this case is null, since we render the output to framebuffer here. Input data -> TS -> FP -> PSP -> Framebuffer.
Implements PureIIncrementalRenderPipeline.
Definition at line 783 of file PureRendererSWincremental.cpp.
|
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.
Implements PureIRenderer.
Definition at line 400 of file PureRendererSWincremental.cpp.
|
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.
Implements PureIRenderer.
Definition at line 356 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 702 of file PureRendererSWincremental.cpp.
|
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.
Implements PureIRenderer.
Definition at line 394 of file PureRendererSWincremental.cpp.
|
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.
Implements PureIRenderer.
Definition at line 322 of file PureRendererSWincremental.cpp.
|
private |
Sets orthographic projection.
Definition at line 893 of file PureRendererSWincremental.cpp.
|
private |
Sets perspective projection.
Definition at line 883 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 994 of file PureRendererSWincremental.cpp.
|
private |
Loop over the input vertices and transform them into pVerticesTransf array.
Number of input vertices is nVertices_h. If bIndexed is true:
Transformation is: Model -> World -> View -> Clip coordinate systems.
Definition at line 510 of file PureRendererSWincremental.cpp.
|
virtual |
Writes "Current Statistics" and "Last Frame Statistics" to the console window.
These are explained at Debugging.
Implements PureIRenderer.
Definition at line 405 of file PureRendererSWincremental.cpp.
|
friend |
Definition at line 176 of file PureRendererSWincremental.cpp.
|
private |
Attributes of Color Buffer DIB.
Definition at line 78 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 66 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 75 of file PureRendererSWincremental.cpp.
|
private |
Memory Device Context for Color Buffer, compatible with wnd's DC.
Definition at line 77 of file PureRendererSWincremental.cpp.
|
private |
Handle to Color Buffer DIB.
Definition at line 79 of file PureRendererSWincremental.cpp.
|
private |
Hardware infos, singleton.
Definition at line 69 of file PureRendererSWincremental.cpp.
|
private |
Definition at line 67 of file PureRendererSWincremental.cpp.
|
private |
Camera, at least 1 instance.
Definition at line 72 of file PureRendererSWincremental.cpp.
|
private |
Color buffer.
Definition at line 80 of file PureRendererSWincremental.cpp.
|
private |
ObjectManager, at least 1 instance.
Definition at line 71 of file PureRendererSWincremental.cpp.
|
private |
UI manager, singleton.
Definition at line 73 of file PureRendererSWincremental.cpp.
|
private |
Depth buffer.
Definition at line 81 of file PureRendererSWincremental.cpp.
|
private |
Render hints.
Definition at line 65 of file PureRendererSWincremental.cpp.
|
private |
Our screen, singleton.
Definition at line 70 of file PureRendererSWincremental.cpp.
|
private |
Our window, where we draw to, singleton.
Definition at line 68 of file PureRendererSWincremental.cpp.