|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CDriverUser Class ReferenceUDriver implementation.
More...
#include <driver_user.h>
Inheritance diagram for NL3D::CDriverUser
[legend]Collaboration diagram for NL3D::CDriverUser:
[legend]List of all members.
Public Methods |
| CDriverUser () |
virtual | ~CDriverUser () |
virtual TModeList | enumModes () |
| Enum All Fullscreen modes. More...
|
virtual void | setDisplay (const CMode &mode) |
| create the window. More...
|
virtual void | release () |
| Release the window. More...
|
virtual bool | activate (void) |
| Before rendering via a driver in a thread, must activate() (per thread). More...
|
virtual bool | isActive () |
| Return true if driver is still active. Return false else. If he user close the window, must return false. More...
|
virtual void | clearRGBABuffer (CRGBA col= CRGBA(255,255,255,255)) |
| This clear only the RGBA back buffer. More...
|
virtual void | clearZBuffer () |
| This clear only the RGBA back buffer. More...
|
virtual void | clearBuffers (CRGBA col= CRGBA(255,255,255,255)) |
| This clear the buffers (ALL the buffer :) ). More...
|
virtual void | swapBuffers () |
| This swap the back and front buffer (ALL the buffer :) ). More...
|
virtual bool | fogEnabled () |
virtual void | enableFog (bool enable) |
virtual void | setupFog (float start, float end, CRGBA color) |
| setup fog parameters. fog must enabled to see result. start and end are in [0,1] range. More...
|
virtual UScene* | createScene () |
| Create a new scene. More...
|
virtual void | deleteScene (UScene *scene) |
| Delete a scene. More...
|
virtual UAnimationSet* | createAnimationSet (const std::string &animationSetFile) |
| Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found. More...
|
virtual void | deleteAnimationSet (UAnimationSet *animationSet) |
| Delete a AnimationSet. More...
|
virtual UPlayListManager* | createPlayListManager () |
| Create a new PlayListManager. More...
|
virtual void | deletePlayListManager (UPlayListManager *playListManager) |
| Delete a PlayListManager. More...
|
virtual UTextContext* | createTextContext (const std::string fontFileName, const std::string fontExFileName = "") |
| create a new TextContext, for a given font. More...
|
virtual void | deleteTextContext (UTextContext *textContext) |
| delete a TextContext. More...
|
virtual void | setFontManagerMaxMemory (uint maxMem) |
| Set the maxMemory used for the FontManager. More...
|
virtual std::string | getFontManagerCacheInformation () const |
| get cahce information. More...
|
virtual UTextureFile* | createTextureFile (const std::string &file) |
| Create a new texture file, searching in CPath. More...
|
virtual void | deleteTextureFile (UTextureFile *textfile) |
| Delete a texture file. This one will be really deleted in memory when no material point to it. More...
|
virtual UTextureRaw* | createTextureRaw () |
| Create a new Raw texture, to be filled by user. More...
|
virtual void | deleteTextureRaw (UTextureRaw *textraw) |
| Delete a Raw texture. This one will be really deleted in memory when no material point to it. More...
|
virtual UMaterial* | createMaterial () |
| Create a new Material, to be filled by user. More...
|
virtual void | deleteMaterial (UMaterial *mat) |
| Delete a Material. More...
|
virtual void | setScissor (const CViewport &) |
| Set the active scissor for rendering. More...
|
virtual CViewport | getScissor () |
virtual void | setViewport (const CViewport &) |
| Set the active viewport for rendering. More...
|
virtual CViewport | getViewport () |
virtual void | setFrustum (const CFrustum &frust) |
| Set the active Frustum for rendering. More...
|
virtual CFrustum | getFrustum () |
virtual void | setViewMatrix (const CMatrix &mat) |
| Set the active ViewMatrix for rendering. More...
|
virtual CMatrix | getViewMatrix () |
virtual void | setModelMatrix (const CMatrix &mat) |
| Set the active ModelMatrix for rendering. More...
|
virtual CMatrix | getModelMatrix () |
virtual void | setMatrixMode2D (const CFrustum &frust) |
| Tool function: Setup frustum/viewmatrix/modelmatrix for 2D. More...
|
virtual void | setMatrixMode3D (UCamera &camera) |
| Tool function: Setup frustum/viewmatrix/modelmatrix for 3D, using parameters of a UCamera. More...
|
virtual void | drawLine (const NLMISC::CLine &tri, UMaterial &mat) |
| Draw the Line, taking color from material. More...
|
virtual void | drawLine (const NLMISC::CLineColor &tri, UMaterial &mat) |
| Draw the Line, taking color from primitive. More...
|
virtual void | drawLine (const NLMISC::CLineUV &tri, UMaterial &mat) |
| Draw the Line, taking color from material. With UV for texture. More...
|
virtual void | drawLine (const NLMISC::CLineColorUV &tri, UMaterial &mat) |
| Draw the Line, taking color from primitive. With UV for texture. More...
|
virtual void | drawTriangle (const NLMISC::CTriangle &tri, UMaterial &mat) |
| Draw the Triangle, taking color from material. More...
|
virtual void | drawTriangle (const NLMISC::CTriangleColor &tri, UMaterial &mat) |
| Draw the Triangle, taking color from primitive. More...
|
virtual void | drawTriangle (const NLMISC::CTriangleUV &tri, UMaterial &mat) |
| Draw the Triangle, taking color from material. With UV for texture. More...
|
virtual void | drawTriangle (const NLMISC::CTriangleColorUV &tri, UMaterial &mat) |
| Draw the Triangle, taking color from primitive. With UV for texture. More...
|
virtual void | drawQuad (const NLMISC::CQuad &tri, UMaterial &mat) |
| Draw the Quad, taking color from material. More...
|
virtual void | drawQuad (const NLMISC::CQuadColor &tri, UMaterial &mat) |
| Draw the Quad, taking color from primitive. More...
|
virtual void | drawQuad (const NLMISC::CQuadUV &tri, UMaterial &mat) |
| Draw the Quad, taking color from material. With UV for texture. More...
|
virtual void | drawQuad (const NLMISC::CQuadColorUV &tri, UMaterial &mat) |
| Draw the Quad, taking color from primitive. With UV for texture. More...
|
virtual void | drawBitmap (float x, float y, float width, float height, class UTexture& texture, bool blend=true, CRGBA col= CRGBA(255,255,255,255)) |
| Draw a bitmap 2D. Warning: this is slow... More...
|
virtual void | drawLine (float x0, float y0, float x1, float y1, CRGBA col= CRGBA(255,255,255,255)) |
| Draw a line in 2D. Warning: this is slow... More...
|
virtual void | drawTriangle (float x0, float y0, float x1, float y1, float x2, float y2, CRGBA col) |
| Draw a Triangle in 2D. Warning: this is slow... More...
|
virtual void | drawQuad (float x0, float y0, float x1, float y1, CRGBA col) |
| Draw a Quad in 2D. Warning: this is slow... More...
|
virtual void | drawQuad (float xcenter, float ycenter, float radius, CRGBA col) |
| Draw a Quad in 2D. Warning: this is slow... More...
|
virtual void | drawWiredQuad (float x0, float y0, float x1, float y1, CRGBA col) |
| Draw a Quad in 2D. Warning: this is slow... More...
|
virtual void | drawWiredQuad (float xcenter, float ycenter, float radius, CRGBA col) |
| Draw a Quad in 2D. Warning: this is slow... More...
|
virtual uint32 | getImplementationVersion () const |
| Get the driver version. More...
|
virtual const char* | getDriverInformation () |
| Get driver informations. More...
|
virtual const char* | getVideocardInformation () |
| Get videocard informations. More...
|
virtual sint | getNbTextureStages () |
| Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay(). More...
|
virtual void | getWindowSize (uint32 &width, uint32 &height) |
| Get the width and the height of the window. More...
|
virtual void | getBuffer (CBitmap &bitmap) |
| get the RGBA back buffer. More...
|
virtual void | getZBuffer (std::vector<float> &zbuffer) |
| get the ZBuffer (back buffer). More...
|
virtual void | getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect) |
| get a part of the RGBA back buffer NB: 0,0 is the bottom left corner of the screen. More...
|
virtual void | getZBufferPart (std::vector<float> &zbuffer, NLMISC::CRect &rect) |
| get a part of the ZBuffer (back buffer). More...
|
virtual TMessageBoxId | systemMessageBox (const char* message, const char* title, TMessageBoxType type=okType, TMessageBoxIcon icon=noIcon) |
| Output a system message box and print a message with an icon. More...
|
virtual void | showCursor (bool b) |
| show cursor if b is true, or hide it if b is false. More...
|
virtual void | setMousePos (float x, float y) |
| x and y must be between 0.0 and 1.0. More...
|
virtual void | setCapture (bool b) |
| If true, capture the mouse to force it to stay under the window. More...
|
virtual void | setPolygonMode (TPolygonMode mode) |
| Set the global polygon mode. More...
|
virtual TPolygonMode | getPolygonMode () |
| Get the global polygon mode. More...
|
virtual UShapeBank* | getShapeBank () |
| Get the global shape bank. More...
|
IDriver* | getDriver () |
void | restoreMatrixContext () |
Protected Types |
typedef CPtrSet<CTextureUser> | TTextureSet |
typedef CPtrSet<CMaterialUser> | TMaterialSet |
typedef CPtrSet<CTextContextUser> | TTextContextSet |
typedef CPtrSet<CSceneUser> | TSceneSet |
typedef CPtrSet<CAnimationSetUser> | TAnimationSetSet |
typedef CPtrSet<CPlayListManagerUser> | TPlayListManagerSet |
Protected Methods |
void | setupMatrixContext () |
CMaterial& | convMat (UMaterial &mat) |
Protected Attributes |
IDriver* | _Driver |
bool | _WindowInit |
CMatrixContext | _CurrentMatrixContext |
CFontManager | _FontManager |
TTextureSet | _Textures |
TMaterialSet | _Materials |
TTextContextSet | _TextContexts |
TSceneSet | _Scenes |
CShapeBankUser | _ShapeBank |
TAnimationSetSet | _AnimationSets |
TPlayListManagerSet | _PlayListManagers |
CVertexBuffer | _VBFlat |
CVertexBuffer | _VBColor |
CVertexBuffer | _VBUv |
CVertexBuffer | _VBColorUv |
CPrimitiveBlock | _PBLine |
CPrimitiveBlock | _PBTri |
CPrimitiveBlock | _PBQuad |
CMaterialUser | _MatFlat |
CMaterialUser | _MatText |
Static Protected Attributes |
bool | _StaticInit = false |
Detailed Description
UDriver implementation.
-
Author(s):
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 58 of file driver_user.h.
Member Typedef Documentation
Constructor & Destructor Documentation
NL3D::CDriverUser::CDriverUser (
|
)
|
|
NL3D::CDriverUser::~CDriverUser (
|
) [virtual]
|
|
Member Function Documentation
bool NL3D::CDriverUser::activate (
|
void ) [inline, virtual]
|
|
void NL3D::CDriverUser::clearBuffers (
|
CRGBA col = CRGBA(255,255,255,255) ) [inline, virtual]
|
|
void NL3D::CDriverUser::clearRGBABuffer (
|
CRGBA col = CRGBA(255,255,255,255) ) [inline, virtual]
|
|
void NL3D::CDriverUser::clearZBuffer (
|
) [inline, virtual]
|
|
UAnimationSet * NL3D::CDriverUser::createAnimationSet (
|
const std::string & animationSetFile ) [virtual]
|
|
|
Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.
Reimplemented from NL3D::UDriver.
Definition at line 76 of file driver_user2.cpp. |
UMaterial * NL3D::CDriverUser::createMaterial (
|
) [virtual]
|
|
UScene * NL3D::CDriverUser::createScene (
|
) [virtual]
|
|
UTextContext * NL3D::CDriverUser::createTextContext (
|
const std::string fontFileName,
|
|
const std::string fontExFileName = "" ) [virtual]
|
|
UTextureFile * NL3D::CDriverUser::createTextureFile (
|
const std::string & file ) [virtual]
|
|
|
Create a new texture file, searching in CPath.
-
Parameters:
-
file
|
filename, local to CPath paths. |
Reimplemented from NL3D::UDriver.
Definition at line 126 of file driver_user2.cpp. |
UTextureRaw * NL3D::CDriverUser::createTextureRaw (
|
) [virtual]
|
|
void NL3D::CDriverUser::deleteAnimationSet (
|
UAnimationSet * animationSet ) [virtual]
|
|
void NL3D::CDriverUser::deleteMaterial (
|
UMaterial * umat ) [virtual]
|
|
void NL3D::CDriverUser::deletePlayListManager (
|
UPlayListManager * playListManager ) [virtual]
|
|
void NL3D::CDriverUser::deleteScene (
|
UScene * scene ) [virtual]
|
|
void NL3D::CDriverUser::deleteTextContext (
|
UTextContext * textContext ) [virtual]
|
|
void NL3D::CDriverUser::deleteTextureFile (
|
UTextureFile * textfile ) [virtual]
|
|
|
Delete a texture file. This one will be really deleted in memory when no material point to it.
Reimplemented from NL3D::UDriver.
Definition at line 133 of file driver_user2.cpp. |
void NL3D::CDriverUser::deleteTextureRaw (
|
UTextureRaw * textraw ) [virtual]
|
|
|
Delete a Raw texture. This one will be really deleted in memory when no material point to it.
Reimplemented from NL3D::UDriver.
Definition at line 145 of file driver_user2.cpp. |
void NL3D::CDriverUser::drawBitmap (
|
float x,
|
|
float y,
|
|
float width,
|
|
float height,
|
|
class UTexture & texture,
|
|
bool blend = true,
|
|
CRGBA col = CRGBA(255,255,255,255) ) [virtual]
|
|
void NL3D::CDriverUser::drawLine (
|
float x0,
|
|
float y0,
|
|
float x1,
|
|
float y1,
|
|
CRGBA col = CRGBA(255,255,255,255) ) [virtual]
|
|
|
Draw the Line, taking color from material.
NB: If you set a texture to your material, the primitives are textured, even if no Uvs are provided.
NB: All rendering are done in current viewport / current matrix context.
Reimplemented from NL3D::UDriver.
Definition at line 324 of file driver_user.cpp. |
void NL3D::CDriverUser::drawQuad (
|
float xcenter,
|
|
float ycenter,
|
|
float radius,
|
|
CRGBA col ) [virtual]
|
|
void NL3D::CDriverUser::drawQuad (
|
float x0,
|
|
float y0,
|
|
float x1,
|
|
float y1,
|
|
CRGBA col ) [virtual]
|
|
void NL3D::CDriverUser::drawTriangle (
|
float x0,
|
|
float y0,
|
|
float x1,
|
|
float y1,
|
|
float x2,
|
|
float y2,
|
|
CRGBA col ) [virtual]
|
|
void NL3D::CDriverUser::drawWiredQuad (
|
float xcenter,
|
|
float ycenter,
|
|
float radius,
|
|
CRGBA col ) [virtual]
|
|
void NL3D::CDriverUser::drawWiredQuad (
|
float x0,
|
|
float y0,
|
|
float x1,
|
|
float y1,
|
|
CRGBA col ) [virtual]
|
|
void NL3D::CDriverUser::enableFog (
|
bool enable ) [inline, virtual]
|
|
bool NL3D::CDriverUser::fogEnabled (
|
) [inline, virtual]
|
|
void NL3D::CDriverUser::getBuffer (
|
CBitmap & bitmap ) [inline, virtual]
|
|
|
get the RGBA back buffer.
-
Parameters:
-
bitmap
|
the buffer will be written in this bitmap |
Reimplemented from NL3D::UDriver.
Definition at line 398 of file driver_user.h. |
void NL3D::CDriverUser::getBufferPart (
|
CBitmap & bitmap,
|
|
NLMISC::CRect & rect ) [inline, virtual]
|
|
|
get a part of the RGBA back buffer NB: 0,0 is the bottom left corner of the screen.
-
Parameters:
-
bitmap
|
the buffer will be written in this bitmap |
rect
|
the in/out (wanted/clipped) part of Color buffer to retrieve. |
Reimplemented from NL3D::UDriver.
Definition at line 418 of file driver_user.h. |
IDriver * NL3D::CDriverUser::getDriver (
|
) [inline]
|
|
const char * NL3D::CDriverUser::getDriverInformation (
|
) [inline, virtual]
|
|
|
Get driver informations.
get the nel name of the driver (ex: "Opengl 1.2 NeL Driver")
Reimplemented from NL3D::UDriver.
Definition at line 367 of file driver_user.h. |
std::string NL3D::CDriverUser::getFontManagerCacheInformation (
|
) const [virtual]
|
|
CFrustum NL3D::CDriverUser::getFrustum (
|
) [virtual]
|
|
uint32 NL3D::CDriverUser::getImplementationVersion (
|
) const [inline, virtual]
|
|
|
Get the driver version.
Not the same than interface version. Incremented at each implementation change.
-
See also:
-
InterfaceVersion
Reimplemented from NL3D::UDriver.
Definition at line 358 of file driver_user.h. |
CMatrix NL3D::CDriverUser::getModelMatrix (
|
) [virtual]
|
|
sint NL3D::CDriverUser::getNbTextureStages (
|
) [inline, virtual]
|
|
|
Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay().
Reimplemented from NL3D::UDriver.
Definition at line 382 of file driver_user.h. |
TPolygonMode NL3D::CDriverUser::getPolygonMode (
|
) [inline, virtual]
|
|
CViewport NL3D::CDriverUser::getScissor (
|
) [virtual]
|
|
UShapeBank * NL3D::CDriverUser::getShapeBank (
|
) [inline, virtual]
|
|
const char * NL3D::CDriverUser::getVideocardInformation (
|
) [inline, virtual]
|
|
CMatrix NL3D::CDriverUser::getViewMatrix (
|
) [virtual]
|
|
CViewport NL3D::CDriverUser::getViewport (
|
) [virtual]
|
|
void NL3D::CDriverUser::getWindowSize (
|
uint32 & width,
|
|
uint32 & height ) [inline, virtual]
|
|
void NL3D::CDriverUser::getZBuffer (
|
std::vector< float >& zbuffer ) [inline, virtual]
|
|
void NL3D::CDriverUser::getZBufferPart (
|
std::vector< float >& zbuffer,
|
|
NLMISC::CRect & rect ) [inline, virtual]
|
|
|
get a part of the ZBuffer (back buffer).
NB: 0,0 is the bottom left corner of the screen. -
Parameters:
-
zbuffer
|
the returned array of Z. size of rec.Width*rec.Height. |
rect
|
the in/out (wanted/clipped) part of ZBuffer to retrieve. |
Reimplemented from NL3D::UDriver.
Definition at line 429 of file driver_user.h. |
bool NL3D::CDriverUser::isActive (
|
) [inline, virtual]
|
|
|
Return true if driver is still active. Return false else. If he user close the window, must return false.
Reimplemented from NL3D::UDriver.
Definition at line 140 of file driver_user.h. |
void NL3D::CDriverUser::release (
|
void ) [virtual]
|
|
void NL3D::CDriverUser::restoreMatrixContext (
|
) [inline]
|
|
void NL3D::CDriverUser::setCapture (
|
bool b ) [inline, virtual]
|
|
void NL3D::CDriverUser::setDisplay (
|
const CMode & mode ) [virtual]
|
|
void NL3D::CDriverUser::setFontManagerMaxMemory (
|
uint maxMem ) [virtual]
|
|
void NL3D::CDriverUser::setFrustum (
|
const CFrustum & frust ) [virtual]
|
|
void NL3D::CDriverUser::setMatrixMode2D (
|
const CFrustum & frust ) [virtual]
|
|
|
Tool function: Setup frustum/viewmatrix/modelmatrix for 2D.
ModelMatrix is setup to identity. ViewMatrix is setup so that (x,y) of vectors maps to x,y screen!!!
Reimplemented from NL3D::UDriver.
Definition at line 290 of file driver_user.cpp. |
void NL3D::CDriverUser::setMatrixMode3D (
|
UCamera & camera ) [virtual]
|
|
|
Tool function: Setup frustum/viewmatrix/modelmatrix for 3D, using parameters of a UCamera.
ModelMatrix setuped to identity. ViewMatrix setuped to the inverse of camera 's LocalMatrix. Frustum setuped to UCamera frustum.
Reimplemented from NL3D::UDriver.
Definition at line 305 of file driver_user.cpp. |
void NL3D::CDriverUser::setModelMatrix (
|
const CMatrix & mat ) [virtual]
|
|
|
Set the active ModelMatrix for rendering.
NB: UScene ignore this function (use camera parameters instead).
Reimplemented from NL3D::UDriver.
Definition at line 276 of file driver_user.cpp. |
void NL3D::CDriverUser::setMousePos (
|
float x,
|
|
float y ) [inline, virtual]
|
|
void NL3D::CDriverUser::setPolygonMode (
|
TPolygonMode mode ) [inline, virtual]
|
|
void NL3D::CDriverUser::setScissor (
|
const CViewport & sc ) [virtual]
|
|
void NL3D::CDriverUser::setViewMatrix (
|
const CMatrix & mat ) [virtual]
|
|
|
Set the active ViewMatrix for rendering.
NB: this is the view matrix, which is the inverse of camera matrix.
Reimplemented from NL3D::UDriver.
Definition at line 265 of file driver_user.cpp. |
void NL3D::CDriverUser::setViewport (
|
const CViewport & vp ) [virtual]
|
|
void NL3D::CDriverUser::setupFog (
|
float start,
|
|
float end,
|
|
CRGBA color ) [inline, virtual]
|
|
|
setup fog parameters. fog must enabled to see result. start and end are in [0,1] range.
Reimplemented from NL3D::UDriver.
Definition at line 187 of file driver_user.h. |
void NL3D::CDriverUser::setupMatrixContext (
|
) [protected]
|
|
void NL3D::CDriverUser::showCursor (
|
bool b ) [inline, virtual]
|
|
void NL3D::CDriverUser::swapBuffers (
|
) [inline, virtual]
|
|
|
Output a system message box and print a message with an icon.
This method can be call even if the driver is not initialized. This method is used to return internal driver problem when string can't be displayed in the driver window. If the driver can't open a messageBox, it should not override this method and let the IDriver class manage it with the ASCII console. -
Parameters:
-
message
|
This is the message to display in the message box. |
title
|
This is the title of the message box. |
type
|
This is the type of the message box, ie number of button and label of buttons. |
icon
|
This is the icon of the message box should use like warning, error etc... |
Reimplemented from NL3D::UDriver.
Definition at line 624 of file driver_user.cpp. |
Member Data Documentation
IDriver * NL3D::CDriverUser::_Driver [protected]
|
|
TSceneSet NL3D::CDriverUser::_Scenes [protected]
|
|
bool NL3D::CDriverUser::_StaticInit = false [static, protected]
|
|
bool NL3D::CDriverUser::_WindowInit [protected]
|
|
The documentation for this class was generated from the following files:
|
|