# 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::IDriver Class Reference

#include <driver.h>

Inheritance diagram for NL3D::IDriver:

NLMISC::CRefCount NL3D::CDriverGL List of all members.

Vertex program interface

enum  TMatrix { ModelView = 0, Projection, ModelViewProjection, NumMatrix }
enum  TTransform {
  Identity = 0, Inverse, Transpose, InverseTranspose,
  NumTransform
}
virtual bool isVertexProgramSupported () const=0
 Does the driver supports vertex programs ? More...

virtual bool isVertexProgramEmulated () const=0
 Does the driver supports vertex program, but emulated by CPU ? More...

virtual bool activeVertexProgram (CVertexProgram *program)=0
 Activate / disactivate a vertex program. More...

virtual void setConstant (uint index, float, float, float, float)=0
 Setup constant values. More...

virtual void setConstant (uint index, double, double, double, double)=0
virtual void setConstant (uint index, const NLMISC::CVector &value)=0
virtual void setConstant (uint index, const NLMISC::CVectorD &value)=0
virtual void setConstant (uint index, uint num, const float *src)=0
 setup several 4 float csts taken from the given tab. More...

virtual void setConstant (uint index, uint num, const double *src)=0
 setup several 4 double csts taken from the given tab. More...

virtual void setConstantMatrix (uint index, TMatrix matrix, TTransform transform)=0
 Setup constants with a current matrix. More...

virtual bool supportVertexProgramDoubleSidedColor () const=0
 Check if the driver support double sided colors vertex programs. More...

virtual void enableVertexProgramDoubleSidedColor (bool doubleSided)=0
 Activate VertexProgram 2Sided Color mode. More...


Public Types

enum  TMessageBoxId {
  okId = 0, yesId, noId, abortId,
  retryId, cancelId, ignoreId, idCount
}
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 }
 Driver's polygon modes. More...

enum  TMatrixCount { MaxModelMatrix = 16 }
 Driver Max matrix count. More...

enum  TVBHardType { VBHardAGP = 0, VBHardVRAM, CountVBHard }
 Driver VertexBufferHard type. More...


Public Methods

 IDriver (void)
virtual ~IDriver (void)
virtual bool init (void)=0
virtual ModeList enumModes ()=0
virtual bool setDisplay (void *wnd, const GfxMode &mode)=0 throw (EBadDisplay)
virtual void * getDisplay ()=0
virtual bool setMonitorColorProperties (const CMonitorColorProperties &properties)=0
 Setup monitor color properties. More...

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

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

virtual bool isTextureExist (const ITexture &tex)=0
 is the texture is set up in the driver. More...

virtual NLMISC::IEventEmittergetEventEmitter (void)=0
virtual bool clear2D (CRGBA rgba)=0
virtual bool clearZBuffer (float zval=1)=0
virtual void setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha)=0
 Set the color mask filter through where the operation done will pass. More...

virtual bool setupTexture (ITexture &tex)=0
 setup a texture, generate and upload if needed. More...

virtual bool setupTextureEx (ITexture &tex, bool bUpload, bool &bAllUploaded, bool bMustRecreateSharedTexture=false)=0
 setup a texture in the driver. More...

virtual bool uploadTexture (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap)=0
 The texture must be created or uploadTexture do nothing. More...

virtual bool uploadTextureCube (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap, uint8 nNumFace)=0
bool invalidateShareTexture (ITexture &)
 Invalidate shared texture. More...

virtual void forceDXTCCompression (bool dxtcComp)=0
 if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed. More...

virtual void forceTextureResize (uint divisor)=0
 if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..) to be divided by Divisor (2, 4, 8...) Default is 1. More...

virtual bool setupMaterial (CMaterial &mat)=0
virtual void setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective=true)=0
virtual void setupViewMatrix (const CMatrix &mtx)=0
 setup the view matrix (inverse of camera matrix). More...

virtual void setupViewMatrixEx (const CMatrix &mtx, const CVector &cameraPos)=0
 setup the view matrix (inverse of camera matrix). More...

virtual void setupModelMatrix (const CMatrix &mtx)=0
 setup the model matrix. More...

virtual void multiplyModelMatrix (const CMatrix &mtx)=0
 multipliy the model matrix. More...

virtual CMatrix getViewMatrix (void) const=0
virtual void forceNormalize (bool normalize)=0
 Force input normal to be normalized by the driver. More...

virtual bool isForceNormalize () const=0
 return the forceNormalize() state. More...

virtual bool supportVertexBufferHard () const=0
 return true if driver support VertexBufferHard. More...

virtual bool slowUnlockVertexBufferHard () const=0
 return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL). More...

virtual uint getMaxVerticesByVertexBufferHard () const=0
 return How many vertices VertexBufferHard support. More...

virtual bool initVertexArrayRange (uint agpMem, uint vramMem=0)=0
 Allocate the initial VertexArray Memory. More...

virtual IVertexBufferHardcreateVertexBufferHard (uint16 vertexFormat, const uint8 *typeArray, uint32 numVertices, TVBHardType vbType)=0
 create a IVertexBufferHard. More...

virtual void deleteVertexBufferHard (IVertexBufferHard *VB)=0
 delete a IVertexBufferHard. More...

virtual void activeVertexBufferHard (IVertexBufferHard *VB)=0
 active a current VB Hard, for future render(). More...

virtual bool activeVertexBuffer (CVertexBuffer &VB)=0
 active a current VB, for future render(). More...

virtual bool activeVertexBuffer (CVertexBuffer &VB, uint first, uint end)=0
 active a current VB, for future render(). More...

virtual void mapTextureStageToUV (uint stage, uint uv)=0
 Say what Texture Stage use what UV coord. More...

virtual bool render (CPrimitiveBlock &PB, CMaterial &Mat)=0
 render a block of primitive with previously setuped VertexBuffer / Matrixes. More...

virtual void renderTriangles (CMaterial &Mat, uint32 *tri, uint32 ntris)=0
 render a list of triangles with previously setuped VertexBuffer / Matrixes. More...

virtual void renderSimpleTriangles (uint32 *tri, uint32 ntris)=0
 render a list of triangles with previously setuped VertexBuffer / Matrixes, AND previously setuped MATERIAL!! This use the last material setuped. More...

virtual void renderPoints (CMaterial &Mat, uint32 numPoints)=0
 render points with previously setuped VertexBuffer / Matrixes. More...

virtual void renderQuads (CMaterial &Mat, uint32 startIndex, uint32 numQuads)=0
 render quads with previously setuped VertexBuffer / Matrixes. More...

virtual bool swapBuffers (void)=0
 Swap the back and front buffers. More...

virtual bool release (void)
 Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers). More...

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

virtual uint8 getBitPerPixel ()=0
 Return the depth of the driver after init(). 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 setupViewport (const class CViewport &viewport)=0
 Set the current viewport. More...

virtual void setupScissor (const class CScissor &scissor)=0
 Set the current Scissor. More...

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 void getWindowSize (uint32 &width, uint32 &height)=0
 Get the width and the height of the window. More...

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 void copyFrameBufferToTexture (ITexture *tex, uint32 level, uint32 offsetx, uint32 offsety, uint32 x, uint32 y, uint32 width, uint32 height)=0
 Copy a portion of the FrameBuffer into a texture. More...

virtual bool fillBuffer (CBitmap &bitmap)=0
 fill the RGBA back buffer. More...

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

virtual uint getMaxLight () const=0
 return the number of light supported by driver. More...

virtual void setLight (uint8 num, const CLight &light)=0
 Setup a light. More...

virtual void enableLight (uint8 num, bool enable=true)=0
 Enable / disable light. More...

virtual void setAmbientColor (CRGBA color)=0
 Set ambiant. More...

virtual void setPerPixelLightingLight (CRGBA diffuse, CRGBA specular, float shininess)=0
 Setup the light used for per pixel lighting. More...

TPolygonMode getPolygonMode ()
 Get the global polygon mode. More...

virtual bool supportPerPixelLighting (bool specular) const=0
virtual void swapTextureHandle (ITexture &tex0, ITexture &tex1)=0
 Special method to internally swap the Driver handle of 2 textures. More...

Disable Hardware Feature
virtual void disableHardwareVertexProgram ()=0
virtual void disableHardwareVertexArrayAGP ()=0
virtual void disableHardwareTextureShader ()=0
Profiling.
virtual void profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut)=0
 Get the number of primitives rendered from the last swapBuffers() call. More...

virtual uint32 profileAllocatedTextureMemory ()=0
 Return the amount of Texture memory requested. More...

virtual uint32 profileSetupedMaterials () const=0
 Get the number of material setuped from the last swapBuffers() call. More...

virtual uint32 profileSetupedModelMatrix () const=0
 Get the number of matrix setuped from the last swapBuffers() call. More...

virtual void enableUsedTextureMemorySum (bool enable=true)=0
 Enable the sum of texture memory used since last swapBuffers() call. More...

virtual uint32 getUsedTextureMemory () const=0
 Return the amount of texture video memory used since last swapBuffers() call. More...

Fog support.
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. More...

Mouse / Keyboard / Game devices
virtual void showCursor (bool b)=0
 show cursor if b is true, or hide it if b is false. More...

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

virtual NLMISC::IMouseDeviceenableLowLevelMouse (bool enable)=0
 Enable / disable low level mouse. More...

virtual NLMISC::IKeyboardDeviceenableLowLevelKeyboard (bool enable)=0
 Enable / disable a low level keyboard. More...

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

virtual NLMISC::IInputDeviceManagergetLowLevelInputDeviceManager ()=0
 Check wether there is a low level device manager available, and get its interface. More...

Texture addressing modes aka textures/pixels shaders
virtual bool supportTextureShaders () const=0
 test wether the device supports some form of texture shader. (could be limited to DX6 EMBM for example). More...

virtual bool isTextureAddrModeSupported (CMaterial::TTexAddressingMode mode) const=0
 test wether a texture addressing mode is supported. More...

virtual void setMatrix2DForTextureOffsetAddrMode (const uint stage, const float mat[4])=0
 setup the 2D matrix for the OffsetTexture, OffsetTextureScale and OffsetTexture addressing mode It should be stored as the following [a0 a1] [a2 a3]. More...

EMBM support. If texture shaders are present, this is not available, must use them instead.
EMBM is a color op of CMaterial.

NB : EMBM is the equivalent of the CMaterial::OffsetTexture addressing mode. However, it is both a texture adressing mode and a color op. NB : EMBM may not be supported by all stages.

virtual bool supportEMBM () const=0
virtual bool isEMBMSupportedAtStage (uint stage) const=0
virtual void setEMBMMatrix (const uint stage, const float mat[4])=0
Misc
virtual bool supportBlendConstantColor () const=0
 Does the driver support Blend Constant Color ??? If yes CMaterial::blendConstant* enum can be used for blend Src ord Dst factor. More...

virtual void setBlendConstantColor (NLMISC::CRGBA col)=0
 see supportBlendConstantColor(). More...

virtual NLMISC::CRGBA getBlendConstantColor () const=0
 see supportBlendConstantColor(). More...


Static Public Methods

void getTextureShareName (const ITexture &tex, std::string &output)
 Get the driver share texture name. More...


Static Public Attributes

const uint32 InterfaceVersion = 0x46
 Version of the driver interface. To increment when the interface change. More...


Protected Methods

void removeVBDrvInfoPtr (ItVBDrvInfoPtrList vbDrvInfoIt)
 remove ptr from the lists in the driver. More...

void removeTextureDrvInfoPtr (ItTexDrvInfoPtrMap texDrvInfoIt)
void removeTextureDrvSharePtr (ItTexDrvSharePtrList texDrvShareIt)
void removeShaderPtr (ItShaderPtrList shaderIt)
void removeVtxPrgDrvInfoPtr (ItVtxPrgDrvInfoPtrList vtxPrgDrvInfoIt)

Protected Attributes

CSynchronized< TTexDrvInfoPtrMap_SyncTexDrvInfos
TTexDrvSharePtrList _TexDrvShares
TShaderPtrList _Shaders
TVBDrvInfoPtrList _VBDrvInfos
TPolygonMode _PolygonMode
TVtxPrgDrvInfoPtrList _VtxPrgDrvInfos

Friends

class IVBDrvInfos
class CTextureDrvShare
class ITextureDrvInfos
class IShader
class IVertexProgramDrvInfos

Member Enumeration Documentation

enum NL3D::IDriver::TMatrix
 

Enumeration values:
ModelView 
Projection 
ModelViewProjection 
NumMatrix 

Definition at line 736 of file driver.h.

enum NL3D::IDriver::TMatrixCount
 

Driver Max matrix count.

Kept for backward compatibility. Suppose any Hardware VertexProgram can handle only 16 matrix

Enumeration values:
MaxModelMatrix 

Definition at line 146 of file driver.h.

enum NL3D::IDriver::TMessageBoxIcon
 

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

Definition at line 131 of file driver.h.

enum NL3D::IDriver::TMessageBoxId
 

Enumeration values:
okId 
yesId 
noId 
abortId 
retryId 
cancelId 
ignoreId 
idCount 

Definition at line 129 of file driver.h.

enum NL3D::IDriver::TMessageBoxType
 

Enumeration values:
okType 
okCancelType 
yesNoType 
abortRetryIgnoreType 
yesNoCancelType 
retryCancelType 
typeCount 

Definition at line 130 of file driver.h.

enum NL3D::IDriver::TPolygonMode
 

Driver's polygon modes.

See also:
setPolygonMode, getPolygonMode
Enumeration values:
Filled 
Line 
Point 

Definition at line 138 of file driver.h.

Referenced by getPolygonMode, and setPolygonMode.

enum NL3D::IDriver::TTransform
 

Enumeration values:
Identity 
Inverse 
Transpose 
InverseTranspose 
NumTransform 

Definition at line 744 of file driver.h.

enum NL3D::IDriver::TVBHardType
 

Driver VertexBufferHard type.

See also:
createVertexBufferHard()
Enumeration values:
VBHardAGP 
VBHardVRAM 
CountVBHard 

Definition at line 153 of file driver.h.


Constructor & Destructor Documentation

NL3D::IDriver::IDriver void   
 

Definition at line 49 of file driver.cpp.

References _PolygonMode, and Filled.

NL3D::IDriver::~IDriver void    [virtual]
 

Definition at line 55 of file driver.cpp.

References _Shaders, _SyncTexDrvInfos, _TexDrvShares, _VBDrvInfos, _VtxPrgDrvInfos, and nlassert.


Member Function Documentation

virtual bool NL3D::IDriver::activate void    [pure virtual]
 

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

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::activeVertexBuffer CVertexBuffer   VB,
uint    first,
uint    end
[pure virtual]
 

active a current VB, for future render().

This method suppose that only vertices in given range will be used in future render(). This could be usefull for DX or OpenGL driver. Undefined results if primitives in render() use vertices not in this range.

NB: please make sure you have setuped / unsetuped the current vertex program BEFORE activate the vertex buffer.

Parameters:
VB  the vertexBuffer to activate.
first  the first vertex important for render (begin to 0). nlassert(first<=end);
end  the last vertex important for render, +1. count==end-first. nlassert(end<=VB.getNumVertices);
See also:
activeVertexProgram

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::activeVertexBuffer CVertexBuffer   VB [pure virtual]
 

active a current VB, for future render().

This method suppose that all vertices in the VB will be used.

NB: please make sure you have setuped / unsetuped the current vertex program BEFORE activate the vertex buffer.

See also:
activeVertexProgram

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::disp, NL3D::CCloud::dispBill, NL3D::CPSUtil::displayBBox, NL3D::CCloud::dispXYZ, NL3D::CNoise3d::flush, NL3D::CNoise3d::flush2passes, NL3D::CCloud::genBill, NL3D::CCloud::generate, NL3D::CCloud::light, and NL3D::CCloud::reset.

virtual void NL3D::IDriver::activeVertexBufferHard IVertexBufferHard   VB [pure virtual]
 

active a current VB Hard, for future render().

NB: please make sure you have setuped / unsetuped the current vertex program BEFORE activate the vertex buffer.

See also:
activeVertexProgram

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::activeVertexProgram CVertexProgram   program [pure virtual]
 

Activate / disactivate a vertex program.

Parameters:
program  is a pointer on a vertex program. Can be NULL to disable the current vertex program.
Returns:
true if setup/unsetup successed, false else.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::clear2D CRGBA    rgba [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::clearZBuffer float    zval = 1 [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::copyFrameBufferToTexture ITexture   tex,
uint32    level,
uint32    offsetx,
uint32    offsety,
uint32    x,
uint32    y,
uint32    width,
uint32    height
[pure virtual]
 

Copy a portion of the FrameBuffer into a texture.

The texture must have been right sized before the call. This mark the texture as valid, but doesn't copy data to system memory. This also mean that regenerating texture datas will erase what has been copied before in the device memory. This doesn't work with compressed textures. Ideally, the FrameBuffer should have the same format than the texture.

Parameters:
tex  the texture to copy to.
level  the mipmap to copy texture to.
xoffset  x position within the destination texture
yoffset  y position within the destination texture
x  x position widthin the framebuffer
y  y position widthin the framebuffer
width  width of the area to be copied.
height  height of the area to be copied.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::genBill, NL3D::CCloud::generate, NL3D::CCloud::light, and NL3D::CCloud::reset.

virtual IVertexBufferHard* NL3D::IDriver::createVertexBufferHard uint16    vertexFormat,
const uint8   typeArray,
uint32    numVertices,
TVBHardType    vbType
[pure virtual]
 

create a IVertexBufferHard.

delete it with deleteVertexBufferHard. NB: user should (must) keep a CRefPtr<> on this ptr, because if driver is deleted (for any reason) the pointer will be no longer valid.

NB: return NULL if driver do not support the requested VertexBufferHard.Reason for failures are:

  • Driver do not support VertexBufferHard at all. ie supportVertexBufferHard() return false.
  • Driver do not support the vbType wanted or the vertexFormat for vertexBufferHard
  • Driver do not support the numVertices wanted.
  • Driver can't allocate any more ressource.
Parameters:
vertexFormat  see CVertexBuffer::setVertexFormat().
numVertices  the number of vertices to be created.
vbType  kind of RAM shere the VB will be allocated.
Returns:
a vertexBufferHard interface.

virtual void NL3D::IDriver::deleteVertexBufferHard IVertexBufferHard   VB [pure virtual]
 

delete a IVertexBufferHard.

NB: VertexBufferHard are automatically deleted at IDriver::release();

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::disableHardwareTextureShader   [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::disableHardwareVertexArrayAGP   [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::disableHardwareVertexProgram   [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::enableFog bool    enable [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::enableLight uint8    num,
bool    enable = true
[pure virtual]
 

Enable / disable light.

You must call setLight() if you active the ligth.

Parameters:
num  is the number of the light to enable / disable.
enable  is true to enable the light, false to disable it.
See also:
setLight()

Implemented in NL3D::CDriverGL.

virtual NLMISC::IKeyboardDevice* NL3D::IDriver::enableLowLevelKeyboard bool    enable [pure virtual]
 

Enable / disable a low level keyboard.

Such a keyboard can only send KeyDown and KeyUp event. It just consider the keyboard as a gamepad with lots of buttons... This returns a interface to some parameters when it is supported, or NULL otherwise. The interface pointer is valid as long as the low level keyboard is enabled. A call to disable the keyboard returns NULL, and restore the default keyboard behaviour

Implemented in NL3D::CDriverGL.

virtual NLMISC::IMouseDevice* NL3D::IDriver::enableLowLevelMouse bool    enable [pure virtual]
 

Enable / disable low level mouse.

This allow to take advantage of some options (speed of the mouse, automatic wrapping) It returns a interface to these parameters when it is supported, or NULL otherwise The interface pointer is valid as long as the low level mouse is enabled. A call to disable the mouse returns NULL, and restore the default mouse behaviour NB : - In this mode the mouse cursor isn't drawn.

  • Calls to showCursor have no effects
    • Calls to setCapture have no effects

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::enableUsedTextureMemorySum bool    enable = true [pure virtual]
 

Enable the sum of texture memory used since last swapBuffers() call.

To retrieve the memory used call getUsedTextureMemory().

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::enableVertexProgramDoubleSidedColor bool    doubleSided [pure virtual]
 

Activate VertexProgram 2Sided Color mode.

In 2Sided mode, the BackFace (if material 2Sided enabled) read the result from o[BFC0], and not o[COL0]. default is false. you should reset to false after use. NB: no-op if not supporte by driver

Implemented in NL3D::CDriverGL.

virtual ModeList NL3D::IDriver::enumModes   [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::fillBuffer CBitmap &    bitmap [pure virtual]
 

fill the RGBA back buffer.

Parameters:
bitmap  will be written in the buffer. no-op if bad size.
Returns:
true if success

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::fogEnabled   [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::forceDXTCCompression bool    dxtcComp [pure virtual]
 

if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed.

Do this only during upload if ITexture::allowDegradation() is true and if ITexture::UploadFormat is "Automatic" and if bitmap format is RGBA.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::forceNormalize bool    normalize [pure virtual]
 

Force input normal to be normalized by the driver.

default is false. NB: driver force the normalisation himself if:

  • current Model matrix has a scale.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::forceTextureResize uint    divisor [pure virtual]
 

if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..) to be divided by Divisor (2, 4, 8...) Default is 1.

NB: this is done only on TextureFile

Implemented in NL3D::CDriverGL.

virtual uint8 NL3D::IDriver::getBitPerPixel   [pure virtual]
 

Return the depth of the driver after init().

Implemented in NL3D::CDriverGL.

virtual NLMISC::CRGBA NL3D::IDriver::getBlendConstantColor   const [pure virtual]
 

see supportBlendConstantColor().

Get the current Blend Constant Color.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::getBuffer CBitmap &    bitmap [pure virtual]
 

get the RGBA back buffer.

Parameters:
bitmap  the buffer will be written in this bitmap

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::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.

Implemented in NL3D::CDriverGL.

virtual void* NL3D::IDriver::getDisplay   [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual const char* NL3D::IDriver::getDriverInformation   [pure virtual]
 

Get driver informations.

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

Implemented in NL3D::CDriverGL.

virtual NLMISC::IEventEmitter* NL3D::IDriver::getEventEmitter void    [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual uint32 NL3D::IDriver::getImplementationVersion   const [pure virtual]
 

Get the driver version.

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

See also:
InterfaceVersion

Implemented in NL3D::CDriverGL.

virtual NLMISC::IInputDeviceManager* NL3D::IDriver::getLowLevelInputDeviceManager   [pure virtual]
 

Check wether there is a low level device manager available, and get its interface.

Return NULL if not available From this interface you can deal with mouse and keyboard as above, but you can also manage game device (joysticks, joypads ...)

Implemented in NL3D::CDriverGL.

virtual uint NL3D::IDriver::getMaxLight   const [pure virtual]
 

return the number of light supported by driver.

typically 8.

See also:
enableLight() setLight()

Implemented in NL3D::CDriverGL.

virtual uint NL3D::IDriver::getMaxVerticesByVertexBufferHard   const [pure virtual]
 

return How many vertices VertexBufferHard support.

Implemented in NL3D::CDriverGL.

virtual sint NL3D::IDriver::getNbTextureStages   const [pure virtual]
 

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

Implemented in NL3D::CDriverGL.

TPolygonMode NL3D::IDriver::getPolygonMode   [inline]
 

Get the global polygon mode.

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

Definition at line 728 of file driver.h.

References _PolygonMode, and TPolygonMode.

void NL3D::IDriver::getTextureShareName const ITexture   tex,
std::string &    output
[static]
 

Get the driver share texture name.

Definition at line 276 of file driver.cpp.

References NLMISC::smprintf.

Referenced by invalidateShareTexture, NL3D::CDriverGL::isTextureExist, and NL3D::CDriverGL::setupTextureEx.

virtual uint32 NL3D::IDriver::getUsedTextureMemory   const [pure virtual]
 

Return the amount of texture video memory used since last swapBuffers() call.

Before use this method, you should enable the sum with enableUsedTextureMemorySum().

Implemented in NL3D::CDriverGL.

virtual const char* NL3D::IDriver::getVideocardInformation   [pure virtual]
 

Get videocard informations.

get the official name of the driver

Implemented in NL3D::CDriverGL.

virtual CMatrix NL3D::IDriver::getViewMatrix void    const [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual emptyProc NL3D::IDriver::getWindowProc   [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::getWindowSize uint32   width,
uint32   height
[pure virtual]
 

Get the width and the height of the window.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::genBill, and NL3D::CCloud::setMode2D.

virtual void NL3D::IDriver::getZBuffer std::vector< float > &    zbuffer [pure virtual]
 

get the ZBuffer (back buffer).

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

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::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.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::init void    [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::initVertexArrayRange uint    agpMem,
uint    vramMem = 0
[pure virtual]
 

Allocate the initial VertexArray Memory.

(no-op if !supportVertexBufferHard()). VertexArrayRange is first reseted, so any VBhard created before will be deleted. NB: call it after setDisplay(). But setDisplay() by default call initVertexArrayRange(16Mo, 0); so this is not necessary. NB: If allocation fails, mem/=2, and retry, until mem < 500K.

Parameters:
agpMem  ammount of AGP Memory required. if 0, reseted.
vramMem  ammount of VRAM Memory required. if 0, reseted.
Returns:
false if one the Buffer has not been allocated (at least at 500K).

Implemented in NL3D::CDriverGL.

bool NL3D::IDriver::invalidateShareTexture ITexture  
 

Invalidate shared texture.

Definition at line 242 of file driver.cpp.

References _SyncTexDrvInfos, _TexDrvShares, and getTextureShareName.

virtual bool NL3D::IDriver::isActive   [pure virtual]
 

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

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::isEMBMSupportedAtStage uint    stage const [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::isForceNormalize   const [pure virtual]
 

return the forceNormalize() state.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::isTextureAddrModeSupported CMaterial::TTexAddressingMode    mode const [pure virtual]
 

test wether a texture addressing mode is supported.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::isTextureExist const ITexture   tex [pure virtual]
 

is the texture is set up in the driver.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::isVertexProgramEmulated   const [pure virtual]
 

Does the driver supports vertex program, but emulated by CPU ?

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::isVertexProgramSupported   const [pure virtual]
 

Does the driver supports vertex programs ?

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::mapTextureStageToUV uint    stage,
uint    uv
[pure virtual]
 

Say what Texture Stage use what UV coord.

by default activeVertexBuffer*() methods map all stage i to UV i. You can change this behavior, after calling activeVertexBuffer*(), by using this method.

eg: mapTextureStageToUV(0,2) will force the 0th texture stage to use the 2th UV.

Warning! This DOESN'T work with VertexProgram enabled!! (assert)

Warning!: some CMaterial Shader may change automatically this behavior too when setupMaterial() (and so render*()) is called. But Normal shader doesn't do it.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::multiplyModelMatrix const CMatrix &    mtx [pure virtual]
 

multipliy the model matrix.

NB: you must use multiplyModelMatrix() AFTER setupModelMatrix() (and so setupViewMatrix()) or an other multiplyModelMatrix(), or else undefined results.

Using of multiplyModelMatrix() instead of just one setupModelMatrix() may be usefull for precision consideration.

Implemented in NL3D::CDriverGL.

virtual uint32 NL3D::IDriver::profileAllocatedTextureMemory   [pure virtual]
 

Return the amount of Texture memory requested.

taking mipmap, compression, texture format, etc... into account. NB: because of GeForce*, RGB888 is considered to be 32 bits. So it may be false for others cards :).

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::profileRenderedPrimitives CPrimitiveProfile   pIn,
CPrimitiveProfile   pOut
[pure virtual]
 

Get the number of primitives rendered from the last swapBuffers() call.

Parameters:
pIn  the number of requested rendered primitive.
pOut  the number of effective rendered primitive. pOut==pIn if no multi-pass material is used (Lightmap, Specular ...).

Implemented in NL3D::CDriverGL.

virtual uint32 NL3D::IDriver::profileSetupedMaterials   const [pure virtual]
 

Get the number of material setuped from the last swapBuffers() call.

Implemented in NL3D::CDriverGL.

virtual uint32 NL3D::IDriver::profileSetupedModelMatrix   const [pure virtual]
 

Get the number of matrix setuped from the last swapBuffers() call.

Implemented in NL3D::CDriverGL.

bool NL3D::IDriver::release void    [virtual]
 

Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers).

Reimplemented in NL3D::CDriverGL.

Definition at line 73 of file driver.cpp.

References _Shaders, _SyncTexDrvInfos, _TexDrvShares, _VBDrvInfos, _VtxPrgDrvInfos, NL3D::ItShaderPtrList, NL3D::ItTexDrvSharePtrList, NL3D::ItVBDrvInfoPtrList, NL3D::ItVtxPrgDrvInfoPtrList, and nlassert.

void NL3D::IDriver::removeShaderPtr ItShaderPtrList    shaderIt [protected]
 

Definition at line 231 of file driver.cpp.

References _Shaders, and NL3D::ItShaderPtrList.

void NL3D::IDriver::removeTextureDrvInfoPtr ItTexDrvInfoPtrMap    texDrvInfoIt [protected]
 

Definition at line 218 of file driver.cpp.

References _SyncTexDrvInfos, and NL3D::ItTexDrvInfoPtrMap.

void NL3D::IDriver::removeTextureDrvSharePtr ItTexDrvSharePtrList    texDrvShareIt [protected]
 

Definition at line 226 of file driver.cpp.

References _TexDrvShares, and NL3D::ItTexDrvSharePtrList.

void NL3D::IDriver::removeVBDrvInfoPtr ItVBDrvInfoPtrList    vbDrvInfoIt [protected]
 

remove ptr from the lists in the driver.

Definition at line 213 of file driver.cpp.

References _VBDrvInfos, and NL3D::ItVBDrvInfoPtrList.

void NL3D::IDriver::removeVtxPrgDrvInfoPtr ItVtxPrgDrvInfoPtrList    vtxPrgDrvInfoIt [protected]
 

Definition at line 236 of file driver.cpp.

References _VtxPrgDrvInfos, and NL3D::ItVtxPrgDrvInfoPtrList.

virtual bool NL3D::IDriver::render CPrimitiveBlock   PB,
CMaterial   Mat
[pure virtual]
 

render a block of primitive with previously setuped VertexBuffer / Matrixes.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CPSUtil::displayBBox.

virtual void NL3D::IDriver::renderPoints CMaterial   Mat,
uint32    numPoints
[pure virtual]
 

render points with previously setuped VertexBuffer / Matrixes.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::renderQuads CMaterial   Mat,
uint32    startIndex,
uint32    numQuads
[pure virtual]
 

render quads with previously setuped VertexBuffer / Matrixes.

Quads are stored as a sequence in the vertex buffer.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::disp, NL3D::CCloud::dispBill, NL3D::CCloud::dispXYZ, NL3D::CNoise3d::flush, NL3D::CNoise3d::flush2passes, NL3D::CCloud::genBill, NL3D::CCloud::generate, NL3D::CCloud::light, and NL3D::CCloud::reset.

virtual void NL3D::IDriver::renderSimpleTriangles uint32   tri,
uint32    ntris
[pure virtual]
 

render a list of triangles with previously setuped VertexBuffer / Matrixes, AND previously setuped MATERIAL!! This use the last material setuped.

It should be a "Normal shader" material, because no multi-pass is allowed with this method. Actually, it is like a straight drawTriangles() in OpenGL. NB: nlassert() if ntris is 0!!!! this is unlike other render() call methods. For optimisation concern. NB: this is usefull for landscape....

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::renderTriangles CMaterial   Mat,
uint32   tri,
uint32    ntris
[pure virtual]
 

render a list of triangles with previously setuped VertexBuffer / Matrixes.

NB: this "was" usefull for landscape....

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setAmbientColor CRGBA    color [pure virtual]
 

Set ambiant.

Parameters:
color  is the new global ambiant color for the scene.
See also:
setLight(), enableLight()

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setBlendConstantColor NLMISC::CRGBA    col [pure virtual]
 

see supportBlendConstantColor().

Set the current Blend Constant Color.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setCapture bool    b [pure virtual]
 

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

NB : this has no effects if a low level mouse is used

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setColorMask bool    bRed,
bool    bGreen,
bool    bBlue,
bool    bAlpha
[pure virtual]
 

Set the color mask filter through where the operation done will pass.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::light.

virtual void NL3D::IDriver::setConstant uint    index,
uint    num,
const double *    src
[pure virtual]
 

setup several 4 double csts taken from the given tab.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setConstant uint    index,
uint    num,
const float *    src
[pure virtual]
 

setup several 4 float csts taken from the given tab.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setConstant uint    index,
const NLMISC::CVectorD   value
[pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setConstant uint    index,
const NLMISC::CVector   value
[pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setConstant uint    index,
double   ,
double   ,
double   ,
double   
[pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setConstant uint    index,
float   ,
float   ,
float   ,
float   
[pure virtual]
 

Setup constant values.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setConstantMatrix uint    index,
TMatrix    matrix,
TTransform    transform
[pure virtual]
 

Setup constants with a current matrix.

This call must be done after setFrustum(), setupViewMatrix() or setupModelMatrix() to get correct results.

Parameters:
index  is the base constant index where to store the matrix. This index must be a multiple of 4.
matrix  is the matrix id to store in the constants
transform  is the transformation to apply to the matrix before store it in the constants.

virtual bool NL3D::IDriver::setDisplay void *    wnd,
const GfxMode   mode
throw (EBadDisplay) [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setEMBMMatrix const uint    stage,
const float    mat[4]
[pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setFrustum float    left,
float    right,
float    bottom,
float    top,
float    znear,
float    zfar,
bool    perspective = true
[pure virtual]
 

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::disp, NL3D::CCloud::genBill, NL3D::CCloudScape::render, and NL3D::CCloud::setMode2D.

virtual void NL3D::IDriver::setLight uint8    num,
const CLight   light
[pure virtual]
 

Setup a light.

You must call enableLight() to active the ligth.

Parameters:
num  is the number of the light to set.
light  is a light to set in this slot.
See also:
enableLight()

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setMatrix2DForTextureOffsetAddrMode const uint    stage,
const float    mat[4]
[pure virtual]
 

setup the 2D matrix for the OffsetTexture, OffsetTextureScale and OffsetTexture addressing mode It should be stored as the following [a0 a1] [a2 a3].

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::setMonitorColorProperties const CMonitorColorProperties   properties [pure virtual]
 

Setup monitor color properties.

Return false if setup failed.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setMousePos float    x,
float    y
[pure virtual]
 

x and y must be between 0.0 and 1.0.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setPerPixelLightingLight CRGBA    diffuse,
CRGBA    specular,
float    shininess
[pure virtual]
 

Setup the light used for per pixel lighting.

The given values should have been modulated by the material diffuse and specular. This is only useful for material that have their shader set as 'PerPixelLighting'

Parameters:
the  light used for per pixel lighting

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setPolygonMode TPolygonMode    mode [inline, 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::CDriverGL.

Definition at line 674 of file driver.h.

References _PolygonMode, and TPolygonMode.

Referenced by NL3D::CCloud::dispBill.

virtual void NL3D::IDriver::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.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::setupMaterial CMaterial   mat [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setupModelMatrix const CMatrix &    mtx [pure virtual]
 

setup the model matrix.

NB: you must setupModelMatrix() AFTER setupViewMatrix(), or else undefined results.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::disp, NL3D::CCloud::genBill, NL3D::CCloudScape::render, and NL3D::CCloud::setMode2D.

virtual void NL3D::IDriver::setupScissor const class CScissor   scissor [pure virtual]
 

Set the current Scissor.

Parameters:
scissor  is a scissor to setup the current Scissor, in Window relative coordinate (0,1).

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::disp, NL3D::CCloudScape::render, and NL3D::CCloud::setMode2D.

virtual bool NL3D::IDriver::setupTexture ITexture   tex [pure virtual]
 

setup a texture, generate and upload if needed.

same as setupTextureEx(tex, true, dummy);

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::setupTextureEx ITexture   tex,
bool    bUpload,
bool &    bAllUploaded,
bool    bMustRecreateSharedTexture = false
[pure virtual]
 

setup a texture in the driver.

Parameters:
bUpload  if true the texture is created and uploaded to VRAM, if false the texture is only created it is useful for the async upload texture to only create the texture and then make invalidate to upload small piece each frame. There is ONE case where bUpload is forced to be true inside the method: if the texture must be converted to RGBA.
See also:
bAllUploaded
Parameters:
bAllUploaded  true if any upload arise (texture invalid, must convert texture etc...).
bMustRecreateSharedTexture  if true and if the texture supportSharing, then the texture is recreated (and uploaded if bUpload==true) into the shared DrvInfo (if found). Default setup (false) imply that the DrvInfo is only bound to tex (thus creating and uploading nothing) NB: the texture must be at least touch()-ed for the recreate to work.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setupViewMatrix const CMatrix &    mtx [pure virtual]
 

setup the view matrix (inverse of camera matrix).

NB: you must setupViewMatrix() BEFORE setupModelMatrix(), or else undefined results.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::disp, NL3D::CCloud::genBill, NL3D::CCloudScape::render, and NL3D::CCloud::setMode2D.

virtual void NL3D::IDriver::setupViewMatrixEx const CMatrix &    mtx,
const CVector &    cameraPos
[pure virtual]
 

setup the view matrix (inverse of camera matrix).

Extended: give a cameraPos (mtx.Pos() is not taken into account but for getViewMatrix()), so the driver use it to remove translation from all ModelMatrixes (and lights pos). This approach improves greatly ZBuffer precision.

This is transparent to user, and getViewMatrix() return mtx (as in setupViewMatrix()).

NB: you must setupViewMatrixEx() BEFORE setupModelMatrix(), or else undefined results.

Parameters:
mtx  the same view matrix (still with correct "inversed" camera position) as if passed in setupViewMatrix()
cameraPos  position of the camera (before inversion, ie mtx.getPos()!=cameraPos ).

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::setupViewport const class CViewport   viewport [pure virtual]
 

Set the current viewport.

Parameters:
viewport  is a viewport to setup as current viewport.

Implemented in NL3D::CDriverGL.

Referenced by NL3D::CCloud::disp, NL3D::CCloud::genBill, NL3D::CCloudScape::render, and NL3D::CCloud::setMode2D.

virtual void NL3D::IDriver::showCursor bool    b [pure virtual]
 

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

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::slowUnlockVertexBufferHard   const [pure virtual]
 

return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL).

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::supportBlendConstantColor   const [pure virtual]
 

Does the driver support Blend Constant Color ??? If yes CMaterial::blendConstant* enum can be used for blend Src ord Dst factor.

If no, using these enum will have undefined results.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::supportEMBM   const [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::supportPerPixelLighting bool    specular const [pure virtual]
 

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::supportTextureShaders   const [pure virtual]
 

test wether the device supports some form of texture shader. (could be limited to DX6 EMBM for example).

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::supportVertexBufferHard   const [pure virtual]
 

return true if driver support VertexBufferHard.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::supportVertexProgramDoubleSidedColor   const [pure virtual]
 

Check if the driver support double sided colors vertex programs.

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::swapBuffers void    [pure virtual]
 

Swap the back and front buffers.

Implemented in NL3D::CDriverGL.

virtual void NL3D::IDriver::swapTextureHandle ITexture   tex0,
ITexture   tex1
[pure virtual]
 

Special method to internally swap the Driver handle of 2 textures.

USE IT WITH CARE (eg: may have Size problems, mipmap problems, format problems ...) Actually, it is used only by CAsyncTextureManager, to manage Lods of DXTC CTextureFile. NB: internally, all textures slots are disabled.

Implemented in NL3D::CDriverGL.

IDriver::TMessageBoxId NL3D::IDriver::systemMessageBox const char *    message,
const char *    title,
TMessageBoxType    type = okType,
TMessageBoxIcon    icon = noIcon
[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::CDriverGL.

Definition at line 136 of file driver.cpp.

References abortId, abortRetryIgnoreType, cancelId, iconCount, ignoreId, nlassert, noId, okCancelType, okId, okType, retryCancelType, retryId, type, typeCount, yesId, yesNoCancelType, and yesNoType.

virtual bool NL3D::IDriver::uploadTexture ITexture   tex,
NLMISC::CRect   rect,
uint8    nNumMipMap
[pure virtual]
 

The texture must be created or uploadTexture do nothing.

These function can be used to upload piece by piece a texture. Use it in conjunction with setupTextureEx(..., false);

Implemented in NL3D::CDriverGL.

virtual bool NL3D::IDriver::uploadTextureCube ITexture   tex,
NLMISC::CRect   rect,
uint8    nNumMipMap,
uint8    nNumFace
[pure virtual]
 

Implemented in NL3D::CDriverGL.


Friends And Related Function Documentation

friend class CTextureDrvShare [friend]
 

Definition at line 878 of file driver.h.

Referenced by NL3D::CDriverGL::setupTextureEx.

friend class IShader [friend]
 

Definition at line 880 of file driver.h.

Referenced by NL3D::CDriverGL::setupMaterial.

friend class ITextureDrvInfos [friend]
 

Definition at line 879 of file driver.h.

Referenced by NL3D::CDriverGL::copyFrameBufferToTexture, and NL3D::CDriverGL::setupTextureEx.

friend class IVBDrvInfos [friend]
 

Definition at line 877 of file driver.h.

friend class IVertexProgramDrvInfos [friend]
 

Definition at line 881 of file driver.h.

Referenced by NL3D::CDriverGL::activeEXTVertexShader, NL3D::CDriverGL::activeNVVertexProgram, NL3D::CDriverGL::setupGlArraysForEXTVertexShader, and NL3D::CDriverGL::toggleGlArraysForEXTVertexShader.


Member Data Documentation

TPolygonMode NL3D::IDriver::_PolygonMode [protected]
 

Definition at line 163 of file driver.h.

Referenced by getPolygonMode, IDriver, and setPolygonMode.

TShaderPtrList NL3D::IDriver::_Shaders [protected]
 

Definition at line 161 of file driver.h.

Referenced by release, removeShaderPtr, NL3D::CDriverGL::setupMaterial, and ~IDriver.

CSynchronized<TTexDrvInfoPtrMap> NL3D::IDriver::_SyncTexDrvInfos [protected]
 

Definition at line 158 of file driver.h.

Referenced by invalidateShareTexture, NL3D::CDriverGL::isTextureExist, release, removeTextureDrvInfoPtr, NL3D::CDriverGL::setupTextureEx, and ~IDriver.

TTexDrvSharePtrList NL3D::IDriver::_TexDrvShares [protected]
 

Definition at line 160 of file driver.h.

Referenced by invalidateShareTexture, release, removeTextureDrvSharePtr, NL3D::CDriverGL::setupTextureEx, and ~IDriver.

TVBDrvInfoPtrList NL3D::IDriver::_VBDrvInfos [protected]
 

Definition at line 162 of file driver.h.

Referenced by release, removeVBDrvInfoPtr, NL3D::CDriverGL::setupVertexBuffer, and ~IDriver.

TVtxPrgDrvInfoPtrList NL3D::IDriver::_VtxPrgDrvInfos [protected]
 

Definition at line 164 of file driver.h.

Referenced by NL3D::CDriverGL::activeEXTVertexShader, NL3D::CDriverGL::activeNVVertexProgram, release, removeVtxPrgDrvInfoPtr, and ~IDriver.

const uint32 NL3D::IDriver::InterfaceVersion = 0x46 [static]
 

Version of the driver interface. To increment when the interface change.

Definition at line 46 of file driver.cpp.


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