# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::UDriver Class Reference

Game Interface for window Driver, first object to create. More...

#include <u_driver.h>

Inheritance diagram for NL3D::UDriver

Inheritance graph
[legend]
Collaboration diagram for NL3D::UDriver:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector<CModeTModeList
enum  TMessageBoxId {
  okId = 0,
  yesId,
  noId,
  abortId,
  retryId,
  cancelId,
  ignoreId,
  idCount
}
 Message Box enums. More...

enum  TMessageBoxType {
  okType = 0,
  okCancelType,
  yesNoType,
  abortRetryIgnoreType,
  yesNoCancelType,
  retryCancelType,
  typeCount
}
enum  TMessageBoxIcon {
  noIcon = 0,
  handIcon,
  questionIcon,
  exclamationIcon,
  asteriskIcon,
  warningIcon,
  errorIcon,
  informationIcon,
  stopIcon,
  iconCount
}
enum  TPolygonMode {
  Filled = 0,
  Line,
  Point
}
 Polygon Mode. More...


Public Methods

 UDriver ()
virtual ~UDriver ()
virtual TModeList enumModes () = 0
 Enum All Fullscreen modes.

virtual void setDisplay (const CMode &mode) = 0
 create the window. call activate().

virtual void release () = 0
 Release the window. All components are released (Texture, materials, scene, textcontexts).

virtual bool activate (void) = 0
 Before rendering via a driver in a thread, must activate() (per thread).

virtual bool isActive () = 0
 Return true if driver is still active. Return false else. If he user close the window, must return false.

virtual void clearRGBABuffer (CRGBA col= CRGBA(255,255,255,255)) = 0
 This clear only the RGBA back buffer.

virtual void clearZBuffer () = 0
 This clear only the Zbuffer.

virtual void clearBuffers (CRGBA col= CRGBA(255,255,255,255)) = 0
 This clear the buffers (ALL the buffer :) ).

virtual void swapBuffers () = 0
 This swap the back and front buffer (ALL the buffer :) ).

virtual bool fogEnabled () = 0
virtual void enableFog (bool enable) = 0
virtual void setupFog (float start, float end, CRGBA color) = 0
 setup fog parameters. fog must enabled to see result. start and end are in [0,1] range.

virtual UScenecreateScene () = 0
 Create a new scene.

virtual void deleteScene (UScene *scene) = 0
 Delete a scene.

virtual UAnimationSetcreateAnimationSet (const std::string &animationSetFile) = 0
 Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.

virtual void deleteAnimationSet (UAnimationSet *animationSet) = 0
 Delete a AnimationSet. NB: actually, this animation set is internally deleted only when no more UPlayList use it.

virtual UPlayListManagercreatePlayListManager () = 0
 Create a new PlayListManager.

virtual void deletePlayListManager (UPlayListManager *playListManager) = 0
 Delete a PlayListManager.

virtual UTextContextcreateTextContext (const std::string fontFileName, const std::string fontExFileName = "") = 0
 create a new TextContext, for a given font.

virtual void deleteTextContext (UTextContext *textContext) = 0
 delete a TextContext.

virtual void setFontManagerMaxMemory (uint maxMem) = 0
 Set the maxMemory used for the FontManager.

virtual std::string getFontManagerCacheInformation () const = 0
 get cahce information.

virtual UTextureFilecreateTextureFile (const std::string &file) = 0
 Create a new texture file, searching in CPath. More...

virtual void deleteTextureFile (UTextureFile *textfile) = 0
 Delete a texture file. This one will be really deleted in memory when no material point to it.

virtual UTextureRawcreateTextureRaw () = 0
 Create a new Raw texture, to be filled by user.

virtual void deleteTextureRaw (UTextureRaw *textraw) = 0
 Delete a Raw texture. This one will be really deleted in memory when no material point to it.

virtual UMaterialcreateMaterial () = 0
 Create a new Material, to be filled by user.

virtual void deleteMaterial (UMaterial *mat) = 0
 Delete a Material.

virtual void setScissor (const CViewport &) = 0
 Set the active scissor for rendering. More...

virtual CViewport getScissor () = 0
virtual void setViewport (const CViewport &) = 0
 Set the active viewport for rendering. More...

virtual CViewport getViewport () = 0
virtual void setFrustum (const CFrustum &frust) = 0
 Set the active Frustum for rendering.

virtual CFrustum getFrustum () = 0
virtual void setViewMatrix (const CMatrix &mat) = 0
 Set the active ViewMatrix for rendering. More...

virtual CMatrix getViewMatrix () = 0
virtual void setModelMatrix (const CMatrix &mat) = 0
 Set the active ModelMatrix for rendering. More...

virtual CMatrix getModelMatrix () = 0
virtual void setMatrixMode2D (const CFrustum &frust) = 0
 Tool function: Setup frustum/viewmatrix/modelmatrix for 2D. More...

void setMatrixMode2D11 ()
 Tool function: same as setMatrixMode2D(), using a CFrustum(0,1,0,1,-1,1,false). More...

void setMatrixMode2D43 ()
 Tool function: same as setMatrixMode2D(), using a CFrustum(0,4/3,0,1,-1,1,false). More...

virtual void setMatrixMode3D (UCamera &camera) = 0
 Tool function: Setup frustum/viewmatrix/modelmatrix for 3D, using parameters of a UCamera. More...

virtual void drawLine (const NLMISC::CLine &tri, UMaterial &mat) = 0
 Draw the Line, taking color from material. More...

virtual void drawLine (const NLMISC::CLineColor &tri, UMaterial &mat) = 0
 Draw the Line, taking color from primitive.

virtual void drawLine (const NLMISC::CLineUV &tri, UMaterial &mat) = 0
 Draw the Line, taking color from material. With UV for texture.

virtual void drawLine (const NLMISC::CLineColorUV &tri, UMaterial &mat) = 0
 Draw the Line, taking color from primitive. With UV for texture.

virtual void drawTriangle (const NLMISC::CTriangle &tri, UMaterial &mat) = 0
 Draw the Triangle, taking color from material.

virtual void drawTriangle (const NLMISC::CTriangleColor &tri, UMaterial &mat) = 0
 Draw the Triangle, taking color from primitive.

virtual void drawTriangle (const NLMISC::CTriangleUV &tri, UMaterial &mat) = 0
 Draw the Triangle, taking color from material. With UV for texture.

virtual void drawTriangle (const NLMISC::CTriangleColorUV &tri, UMaterial &mat) = 0
 Draw the Triangle, taking color from primitive. With UV for texture.

virtual void drawQuad (const NLMISC::CQuad &tri, UMaterial &mat) = 0
 Draw the Quad, taking color from material.

virtual void drawQuad (const NLMISC::CQuadColor &tri, UMaterial &mat) = 0
 Draw the Quad, taking color from primitive.

virtual void drawQuad (const NLMISC::CQuadUV &tri, UMaterial &mat) = 0
 Draw the Quad, taking color from material. With UV for texture.

virtual void drawQuad (const NLMISC::CQuadColorUV &tri, UMaterial &mat) = 0
 Draw the Quad, taking color from primitive. With UV for texture.

virtual void drawBitmap (float x, float y, float width, float height, class UTexture& texture, bool blend=true, CRGBA col= CRGBA(255,255,255,255)) = 0
 Draw a bitmap 2D. Warning: this is slow...

virtual void drawLine (float x0, float y0, float x1, float y1, CRGBA col= CRGBA(255,255,255,255)) = 0
 Draw a line in 2D. Warning: this is slow...

virtual void drawTriangle (float x0, float y0, float x1, float y1, float x2, float y2, CRGBA col) = 0
 Draw a Triangle in 2D. Warning: this is slow...

virtual void drawQuad (float x0, float y0, float x1, float y1, CRGBA col) = 0
 Draw a Quad in 2D. Warning: this is slow...

virtual void drawQuad (float xcenter, float ycenter, float radius, CRGBA col) = 0
 Draw a Quad in 2D. Warning: this is slow...

virtual void drawWiredQuad (float x0, float y0, float x1, float y1, CRGBA col) = 0
 Draw a Quad in 2D. Warning: this is slow...

virtual void drawWiredQuad (float xcenter, float ycenter, float radius, CRGBA col) = 0
 Draw a Quad in 2D. Warning: this is slow...

virtual uint32 getImplementationVersion () const = 0
 Get the driver version. More...

virtual const char* getDriverInformation () = 0
 Get driver informations. More...

virtual const char* getVideocardInformation () = 0
 Get videocard informations. More...

virtual sint getNbTextureStages () = 0
 Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay().

virtual void getWindowSize (uint32 &width, uint32 &height) = 0
 Get the width and the height of the window.

virtual void getBuffer (CBitmap &bitmap) = 0
 get the RGBA back buffer. More...

virtual void getZBuffer (std::vector<float> &zbuffer) = 0
 get the ZBuffer (back buffer). More...

virtual void getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect) = 0
 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) = 0
 get a part of the ZBuffer (back buffer). More...

virtual TMessageBoxId systemMessageBox (const char* message, const char* title, TMessageBoxType type=okType, TMessageBoxIcon icon=noIcon) = 0
 Output a system message box and print a message with an icon. More...

virtual void showCursor (bool b) = 0
 show cursor if b is true, or hide it if b is false.

virtual void setMousePos (float x, float y) = 0
 x and y must be between 0.0 and 1.0.

virtual void setCapture (bool b) = 0
 If true, capture the mouse to force it to stay under the window.

virtual void setPolygonMode (TPolygonMode mode) = 0
 Set the global polygon mode. More...

virtual TPolygonMode getPolygonMode () = 0
 Get the global polygon mode. More...

virtual UShapeBankgetShapeBank () = 0
 Get the global shape bank. More...


Public Attributes

NLMISC::CEventServer EventServer
 The EventServer of this driver. Init after setDisplay()!! More...

NLMISC::CEventListenerAsync AsyncListener
 The AsyncListener of this driver. Init after setDisplay()!! More...


Static Public Methods

UDriver* createDriver ()
 This is the static function which build a UDriver, the root for all 3D functions. More...


Detailed Description

Game Interface for window Driver, first object to create.

From UDriver, you can create Scene, and render basic primitives (slow!!)

All function calls are invalid before init() is called!!

NB: there is ONE FontManager per UDriver.

Author(s):
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 81 of file u_driver.h.


Member Typedef Documentation

typedef std::vector<CMode> NL3D::UDriver::TModeList
 

Definition at line 110 of file u_driver.h.


Member Enumeration Documentation

enum NL3D::UDriver::TMessageBoxIcon
 

Enumeration values:
noIcon  
handIcon  
questionIcon  
exclamationIcon  
asteriskIcon  
warningIcon  
errorIcon  
informationIcon  
stopIcon  
iconCount  

Definition at line 116 of file u_driver.h.

enum NL3D::UDriver::TMessageBoxId
 

Message Box enums.

Enumeration values:
okId  
yesId  
noId  
abortId  
retryId  
cancelId  
ignoreId  
idCount  

Definition at line 114 of file u_driver.h.

enum NL3D::UDriver::TMessageBoxType
 

Enumeration values:
okType  
okCancelType  
yesNoType  
abortRetryIgnoreType  
yesNoCancelType  
retryCancelType  
typeCount  

Definition at line 115 of file u_driver.h.

enum NL3D::UDriver::TPolygonMode
 

Polygon Mode.

Enumeration values:
Filled  
Line  
Point  

Definition at line 119 of file u_driver.h.


Constructor & Destructor Documentation

NL3D::UDriver::UDriver ( )
 

Definition at line 58 of file driver_user.cpp.

NL3D::UDriver::~UDriver ( ) [virtual]
 

Definition at line 62 of file driver_user.cpp.


Member Function Documentation

bool NL3D::UDriver::activate ( void ) [pure virtual]
 

Before rendering via a driver in a thread, must activate() (per thread).

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::clearBuffers ( CRGBA col = CRGBA(255,255,255,255) ) [pure virtual]
 

This clear the buffers (ALL the buffer :) ).

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::clearRGBABuffer ( CRGBA col = CRGBA(255,255,255,255) ) [pure virtual]
 

This clear only the RGBA back buffer.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::clearZBuffer ( ) [pure virtual]
 

This clear only the Zbuffer.

Reimplemented in NL3D::CDriverUser.

UAnimationSet * NL3D::UDriver::createAnimationSet ( const std::string & animationSetFile ) [pure virtual]
 

Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.

Reimplemented in NL3D::CDriverUser.

UDriver * NL3D::UDriver::createDriver ( ) [static]
 

This is the static function which build a UDriver, the root for all 3D functions.

Definition at line 80 of file driver_user.cpp.

UMaterial * NL3D::UDriver::createMaterial ( ) [pure virtual]
 

Create a new Material, to be filled by user.

Reimplemented in NL3D::CDriverUser.

UPlayListManager * NL3D::UDriver::createPlayListManager ( ) [pure virtual]
 

Create a new PlayListManager.

Reimplemented in NL3D::CDriverUser.

UScene * NL3D::UDriver::createScene ( ) [pure virtual]
 

Create a new scene.

Reimplemented in NL3D::CDriverUser.

UTextContext * NL3D::UDriver::createTextContext ( const std::string fontFileName,
const std::string fontExFileName = "" ) [pure virtual]
 

create a new TextContext, for a given font.

Reimplemented in NL3D::CDriverUser.

UTextureFile * NL3D::UDriver::createTextureFile ( const std::string & file ) [pure virtual]
 

Create a new texture file, searching in CPath.

Parameters:
file   filename, local to CPath paths.

Reimplemented in NL3D::CDriverUser.

UTextureRaw * NL3D::UDriver::createTextureRaw ( ) [pure virtual]
 

Create a new Raw texture, to be filled by user.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::deleteAnimationSet ( UAnimationSet * animationSet ) [pure virtual]
 

Delete a AnimationSet. NB: actually, this animation set is internally deleted only when no more UPlayList use it.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::deleteMaterial ( UMaterial * umat ) [pure virtual]
 

Delete a Material.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::deletePlayListManager ( UPlayListManager * playListManager ) [pure virtual]
 

Delete a PlayListManager.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::deleteScene ( UScene * scene ) [pure virtual]
 

Delete a scene.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::deleteTextContext ( UTextContext * textContext ) [pure virtual]
 

delete a TextContext.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::deleteTextureFile ( UTextureFile * textfile ) [pure virtual]
 

Delete a texture file. This one will be really deleted in memory when no material point to it.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::deleteTextureRaw ( UTextureRaw * textraw ) [pure virtual]
 

Delete a Raw texture. This one will be really deleted in memory when no material point to it.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawBitmap ( float x,
float y,
float width,
float height,
class UTexture & texture,
bool blend = true,
CRGBA col = CRGBA(255,255,255,255) ) [pure virtual]
 

Draw a bitmap 2D. Warning: this is slow...

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawLine ( float x0,
float y0,
float x1,
float y1,
CRGBA col = CRGBA(255,255,255,255) ) [pure virtual]
 

Draw a line in 2D. Warning: this is slow...

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawLine ( const NLMISC::CLineColorUV & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Line, taking color from primitive. With UV for texture.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawLine ( const NLMISC::CLineUV & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Line, taking color from material. With UV for texture.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawLine ( const NLMISC::CLineColor & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Line, taking color from primitive.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawLine ( const NLMISC::CLine & shp,
UMaterial & mat ) [pure 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 in NL3D::CDriverUser.

void NL3D::UDriver::drawQuad ( float xcenter,
float ycenter,
float radius,
CRGBA col ) [pure virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawQuad ( float x0,
float y0,
float x1,
float y1,
CRGBA col ) [pure virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawQuad ( const NLMISC::CQuadColorUV & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Quad, taking color from primitive. With UV for texture.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawQuad ( const NLMISC::CQuadUV & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Quad, taking color from material. With UV for texture.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawQuad ( const NLMISC::CQuadColor & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Quad, taking color from primitive.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawQuad ( const NLMISC::CQuad & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Quad, taking color from material.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawTriangle ( float x0,
float y0,
float x1,
float y1,
float x2,
float y2,
CRGBA col ) [pure virtual]
 

Draw a Triangle in 2D. Warning: this is slow...

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawTriangle ( const NLMISC::CTriangleColorUV & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Triangle, taking color from primitive. With UV for texture.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawTriangle ( const NLMISC::CTriangleUV & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Triangle, taking color from material. With UV for texture.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawTriangle ( const NLMISC::CTriangleColor & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Triangle, taking color from primitive.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawTriangle ( const NLMISC::CTriangle & shp,
UMaterial & mat ) [pure virtual]
 

Draw the Triangle, taking color from material.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawWiredQuad ( float xcenter,
float ycenter,
float radius,
CRGBA col ) [pure virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::drawWiredQuad ( float x0,
float y0,
float x1,
float y1,
CRGBA col ) [pure virtual]
 

Draw a Quad in 2D. Warning: this is slow...

Reimplemented in NL3D::CDriverUser.

virtual void NL3D::UDriver::enableFog ( bool enable ) [pure virtual]
 

Reimplemented in NL3D::CDriverUser.

TModeList NL3D::UDriver::enumModes ( ) [pure virtual]
 

Enum All Fullscreen modes.

Reimplemented in NL3D::CDriverUser.

bool NL3D::UDriver::fogEnabled ( ) [pure virtual]
 

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::getBuffer ( CBitmap & bitmap ) [pure virtual]
 

get the RGBA back buffer.

Parameters:
bitmap   the buffer will be written in this bitmap

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::getBufferPart ( CBitmap & bitmap,
NLMISC::CRect & rect ) [pure 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 in NL3D::CDriverUser.

const char * NL3D::UDriver::getDriverInformation ( ) [pure virtual]
 

Get driver informations.

get the nel name of the driver (ex: "Opengl 1.2 NeL Driver")

Reimplemented in NL3D::CDriverUser.

std::string NL3D::UDriver::getFontManagerCacheInformation ( ) const [pure virtual]
 

get cahce information.

Reimplemented in NL3D::CDriverUser.

virtual CFrustum NL3D::UDriver::getFrustum ( ) [pure virtual]
 

Reimplemented in NL3D::CDriverUser.

uint32 NL3D::UDriver::getImplementationVersion ( ) const [pure virtual]
 

Get the driver version.

Not the same than interface version. Incremented at each implementation change.

See also:
InterfaceVersion

Reimplemented in NL3D::CDriverUser.

virtual CMatrix NL3D::UDriver::getModelMatrix ( ) [pure virtual]
 

Reimplemented in NL3D::CDriverUser.

sint NL3D::UDriver::getNbTextureStages ( ) [pure virtual]
 

Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay().

Reimplemented in NL3D::CDriverUser.

TPolygonMode NL3D::UDriver::getPolygonMode ( ) [pure virtual]
 

Get the global polygon mode.

Parameters:
polygon   mode choose in this driver.
See also:
setPolygonMode(), TPolygonMode

Reimplemented in NL3D::CDriverUser.

virtual CViewport NL3D::UDriver::getScissor ( ) [pure virtual]
 

Reimplemented in NL3D::CDriverUser.

UShapeBank * NL3D::UDriver::getShapeBank ( ) [pure virtual]
 

Get the global shape bank.

The shape bank handles all the shape caches.

See also:
UShapeBank

Reimplemented in NL3D::CDriverUser.

const char * NL3D::UDriver::getVideocardInformation ( ) [pure virtual]
 

Get videocard informations.

get the official name of the driver

Reimplemented in NL3D::CDriverUser.

virtual CMatrix NL3D::UDriver::getViewMatrix ( void ) [pure virtual]
 

Reimplemented in NL3D::CDriverUser.

virtual CViewport NL3D::UDriver::getViewport ( ) [pure virtual]
 

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::getWindowSize ( uint32 & width,
uint32 & height ) [pure virtual]
 

Get the width and the height of the window.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::getZBuffer ( std::vector< float >& zbuffer ) [pure virtual]
 

get the ZBuffer (back buffer).

Parameters:
zbuffer   the returned array of Z. size of getWindowSize() .

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::getZBufferPart ( std::vector< float >& zbuffer,
NLMISC::CRect & rect ) [pure 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 in NL3D::CDriverUser.

bool NL3D::UDriver::isActive ( ) [pure virtual]
 

Return true if driver is still active. Return false else. If he user close the window, must return false.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::release ( void ) [pure virtual]
 

Release the window. All components are released (Texture, materials, scene, textcontexts).

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setCapture ( bool b ) [pure virtual]
 

If true, capture the mouse to force it to stay under the window.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setDisplay ( const CMode & mode ) [pure virtual]
 

create the window. call activate().

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setFontManagerMaxMemory ( uint maxMem ) [pure virtual]
 

Set the maxMemory used for the FontManager.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setFrustum ( const CFrustum & frust ) [pure virtual]
 

Set the active Frustum for rendering.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setMatrixMode2D ( const CFrustum & frust ) [pure 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 in NL3D::CDriverUser.

void NL3D::UDriver::setMatrixMode2D11 ( )
 

Tool function: same as setMatrixMode2D(), using a CFrustum(0,1,0,1,-1,1,false).

Definition at line 68 of file driver_user.cpp.

void NL3D::UDriver::setMatrixMode2D43 ( )
 

Tool function: same as setMatrixMode2D(), using a CFrustum(0,4/3,0,1,-1,1,false).

Definition at line 73 of file driver_user.cpp.

void NL3D::UDriver::setMatrixMode3D ( UCamera & camera ) [pure 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 in NL3D::CDriverUser.

void NL3D::UDriver::setModelMatrix ( const CMatrix & mat ) [pure virtual]
 

Set the active ModelMatrix for rendering.

NB: UScene ignore this function (use camera parameters instead).

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setMousePos ( float x,
float y ) [pure virtual]
 

x and y must be between 0.0 and 1.0.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setPolygonMode ( TPolygonMode mode ) [pure virtual]
 

Set the global polygon mode.

Can be filled, line or point. The implementation driver must call IDriver::setPolygonMode() and active this mode.

Parameters:
polygon   mode choose in this driver.
See also:
getPolygonMode(), TPolygonMode

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setScissor ( const CViewport & sc ) [pure virtual]
 

Set the active scissor for rendering.

Default to fullscreen.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setViewMatrix ( const CMatrix & mat ) [pure virtual]
 

Set the active ViewMatrix for rendering.

NB: this is the view matrix, which is the inverse of camera matrix.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setViewport ( const CViewport & vp ) [pure virtual]
 

Set the active viewport for rendering.

Default to fullscreen.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::setupFog ( float start,
float end,
CRGBA color ) [pure virtual]
 

setup fog parameters. fog must enabled to see result. start and end are in [0,1] range.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::showCursor ( bool b ) [pure virtual]
 

show cursor if b is true, or hide it if b is false.

Reimplemented in NL3D::CDriverUser.

void NL3D::UDriver::swapBuffers ( ) [pure virtual]
 

This swap the back and front buffer (ALL the buffer :) ).

Reimplemented in NL3D::CDriverUser.

TMessageBoxId NL3D::UDriver::systemMessageBox ( const char * message,
const char * title,
TMessageBoxType type = okType,
TMessageBoxIcon icon = noIcon ) [pure 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 in NL3D::CDriverUser.


Member Data Documentation

NLMISC::CEventListenerAsync NL3D::UDriver::AsyncListener
 

The AsyncListener of this driver. Init after setDisplay()!!

Definition at line 126 of file u_driver.h.

NLMISC::CEventServer NL3D::UDriver::EventServer
 

The EventServer of this driver. Init after setDisplay()!!

Definition at line 124 of file u_driver.h.


The documentation for this class was generated from the following files: