|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CDriverGL Class Reference#include <driver_opengl.h>
Inheritance diagram for NL3D::CDriverGL:
List of all members.
EXTVertexShader specifics. |
enum | EEVSVariants {
EVSSecondaryColorVariant = 0,
EVSFogCoordsVariant = 1,
EVSSkinWeightVariant = 2,
EVSPaletteSkinVariant = 3,
EVSNumVariants
} |
bool | setupEXTVertexShader (const CVPParser::TProgram &program, GLuint id, uint variants[EVSNumVariants], uint16 &usedInputRegisters) |
| Setup a vertex shader from its parsed program. More...
|
GLuint | _EVSPositionHandle |
GLuint | _EVSNormalHandle |
GLuint | _EVSColorHandle |
GLuint | _EVSTexHandle [8] |
GLuint | _EVSConstantHandle |
Per pixel lighting |
typedef NLMISC::CSmartPtr<
CTextureCube > | TSPTextureCube |
typedef std::vector< TSPTextureCube > | TTexCubeVect |
sint | beginPPLMultiPass () |
void | setupPPLPass (uint pass) |
void | endPPLMultiPass () |
sint | beginPPLNoSpecMultiPass () |
void | setupPPLNoSpecPass (uint pass) |
void | endPPLNoSpecMultiPass () |
CTextureCube * | getSpecularCubeMap (uint exp) |
| get (and if necessary, build) a cube map used for specular lighting. The range for exponent is limited, and only the best fit is used. More...
|
CTextureCube * | getDiffuseCubeMap () |
TTexCubeVect | _SpecularTextureCubes |
Prec settings, for optimisation. |
enum | CTexEnvSpecial {
TexEnvSpecialDisabled = 0,
TexEnvSpecialLightMap,
TexEnvSpecialSpecularStage0,
TexEnvSpecialSpecularStage1,
TexEnvSpecialSpecularStage1NoText,
TexEnvSpecialPPLStage0,
TexEnvSpecialPPLStage2,
TexEnvSpecialCloudStage0,
TexEnvSpecialCloudStage1
} |
void | resetTextureShaders () |
CMaterial * | _CurrentMaterial |
CMaterial::TShader | _CurrentMaterialSupportedShader |
ITexture * | _CurrentTexture [IDRV_MAT_MAXTEXTURES] |
CTextureDrvInfosGL * | _CurrentTextureInfoGL [IDRV_MAT_MAXTEXTURES] |
CMaterial::CTexEnv | _CurrentTexEnv [IDRV_MAT_MAXTEXTURES] |
CTexEnvSpecial | _CurrentTexEnvSpecial [IDRV_MAT_MAXTEXTURES] |
GLenum | _CurrentTexAddrMode [IDRV_MAT_MAXTEXTURES] |
bool | _NVTextureShaderEnabled |
bool | _StageSupportEMBM [IDRV_MAT_MAXTEXTURES] |
CDriverGLStates | _DriverGLStates |
uint32 | _MaterialAllTextureTouchedFlag |
[NOHEADER] |
void | checkForPerPixelLightingSupport () |
bool | _SupportPerPixelShader |
bool | _SupportPerPixelShaderNoSpec |
float | _PPLExponent |
NLMISC::CRGBA | _PPLightDiffuseColor |
NLMISC::CRGBA | _PPLightSpecularColor |
Material multipass. |
sint | beginMultiPass () |
| init multipass for _CurrentMaterial. return number of pass required to render this material. More...
|
void | setupPass (uint pass) |
| active the ith pass of this material. More...
|
void | endMultiPass () |
| end multipass for this material. More...
|
CVertexBufferInfo | _LastVB |
| LastVB for UV setup. More...
|
Lightmap. |
void | computeLightMapInfos (const CMaterial &mat) |
sint | beginLightMapMultiPass () |
void | setupLightMapPass (uint pass) |
void | endLightMapMultiPass () |
void | resetLightMapVertexSetup () |
uint | _NLightMaps |
| Temp Variables computed in beginLightMapMultiPass(). Reused in setupLightMapPass(). More...
|
uint | _NLightMapPerPass |
uint | _NLightMapPass |
std::vector< uint > | _LightMapLUT |
CMaterial::CTexEnv | _LightMapLastStageEnv |
bool | _LastVertexSetupIsLightMap |
sint8 | _LightMapUVMap [IDRV_MAT_MAXTEXTURES] |
VertexBufferHard |
void | resetVertexArrayRange () |
void | fenceOnCurVBHardIfNeeded (IVertexBufferHardGL *newVBHard) |
CPtrSet< IVertexBufferHardGL > | _VertexBufferHardSet |
IVertexArrayRange * | _CurrentVertexArrayRange |
IVertexBufferHardGL * | _CurrentVertexBufferHard |
void * | _NVCurrentVARPtr |
uint32 | _NVCurrentVARSize |
bool | _SupportVBHard |
bool | _SlowUnlockVBHard |
uint32 | _MaxVerticesByVBHard |
IVertexArrayRange * | _AGPVertexArrayRange |
IVertexArrayRange * | _VRAMVertexArrayRange |
class | CVertexArrayRangeNVidia |
class | CVertexBufferHardGLNVidia |
class | CVertexArrayRangeATI |
class | CVertexBufferHardGLATI |
Profiling |
uint | computeMipMapMemoryUsage (uint w, uint h, GLint glfmt) const |
CPrimitiveProfile | _PrimitiveProfileIn |
CPrimitiveProfile | _PrimitiveProfileOut |
uint32 | _AllocatedTextureMemory |
uint32 | _NbSetupMaterialCall |
uint32 | _NbSetupModelMatrixCall |
bool | _SumTextureMemoryUsed |
std::set< CTextureDrvInfosGL * > | _TextureUsed |
Caustics shaders |
NLMISC::CSmartPtr< CTextureCube > | _CausticCubeMap |
void | initCausticCubeMap () |
Public Types |
enum | { MaxLight = 8
} |
Public Methods |
uint32 | getHwnd () |
| CDriverGL () |
virtual | ~CDriverGL () |
virtual bool | init () |
virtual ModeList | enumModes () |
virtual void | disableHardwareVertexProgram () |
virtual void | disableHardwareVertexArrayAGP () |
virtual void | disableHardwareTextureShader () |
virtual bool | setDisplay (void *wnd, const GfxMode &mode) throw (EBadDisplay) |
virtual void * | getDisplay () |
virtual emptyProc | getWindowProc () |
virtual bool | activate () |
| Before rendering via a driver in a thread, must activate() (per thread). More...
|
virtual sint | getNbTextureStages () const |
| Get the number of texture stage avaliable, for multitexturing (Normal material shaders). Valid only after setDisplay(). More...
|
virtual bool | isTextureExist (const ITexture &tex) |
| is the texture is set up in the driver. More...
|
virtual NLMISC::IEventEmitter * | getEventEmitter () |
virtual bool | clear2D (CRGBA rgba) |
virtual bool | clearZBuffer (float zval=1) |
virtual void | setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha) |
| Set the color mask filter through where the operation done will pass. More...
|
virtual bool | setupTexture (ITexture &tex) |
| setup a texture, generate and upload if needed. More...
|
virtual bool | setupTextureEx (ITexture &tex, bool bUpload, bool &bAllUploaded, bool bMustRecreateSharedTexture=false) |
| setup a texture in the driver. More...
|
virtual bool | uploadTexture (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap) |
| The texture must be created or uploadTexture do nothing. More...
|
virtual bool | uploadTextureCube (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap, uint8 nNumFace) |
virtual void | forceDXTCCompression (bool dxtcComp) |
| if true force all the uncompressed RGBA 32 bits and RGBA 24 bits texture to be DXTC5 compressed. More...
|
virtual void | forceTextureResize (uint divisor) |
| if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc..) to be divided by Divisor (2, 4, 8...) Default is 1. More...
|
void | setTextureEnvFunction (uint stage, CMaterial &mat) |
| Setup texture env functions. Used by setupMaterial. More...
|
void | setupUserTextureMatrix (uint numStages, CMaterial &mat) |
| setup the texture matrix for a given number of stages (starting from 0). More...
|
void | disableUserTextureMatrix () |
| disable all texture matrix. More...
|
virtual bool | setupMaterial (CMaterial &mat) |
| For objects with caustics, setup the first texture (which actually is the one from the material). More...
|
virtual void | setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective=true) |
virtual void | setupViewMatrix (const CMatrix &mtx) |
| setup the view matrix (inverse of camera matrix). More...
|
virtual void | setupViewMatrixEx (const CMatrix &mtx, const CVector &cameraPos) |
| setup the view matrix (inverse of camera matrix). More...
|
virtual void | setupModelMatrix (const CMatrix &mtx) |
| setup the model matrix. More...
|
virtual void | multiplyModelMatrix (const CMatrix &mtx) |
| multipliy the model matrix. More...
|
virtual CMatrix | getViewMatrix () const |
virtual void | forceNormalize (bool normalize) |
| Force input normal to be normalized by the driver. More...
|
virtual bool | isForceNormalize () const |
| return the forceNormalize() state. More...
|
virtual bool | supportVertexBufferHard () const |
| return true if driver support VertexBufferHard. More...
|
virtual bool | slowUnlockVertexBufferHard () const |
| return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL). More...
|
virtual uint | getMaxVerticesByVertexBufferHard () const |
| return How many vertices VertexBufferHard support. More...
|
virtual bool | initVertexArrayRange (uint agpMem, uint vramMem) |
| Allocate the initial VertexArray Memory. More...
|
virtual IVertexBufferHard * | createVertexBufferHard (uint16 vertexFormat, const uint8 *typeArray, uint32 numVertices, IDriver::TVBHardType vbType) |
virtual void | deleteVertexBufferHard (IVertexBufferHard *VB) |
| delete a IVertexBufferHard. More...
|
virtual void | activeVertexBufferHard (IVertexBufferHard *VB) |
| active a current VB Hard, for future render(). More...
|
virtual bool | activeVertexBuffer (CVertexBuffer &VB) |
| active a current VB, for future render(). More...
|
virtual bool | activeVertexBuffer (CVertexBuffer &VB, uint first, uint end) |
| active a current VB, for future render(). More...
|
virtual void | mapTextureStageToUV (uint stage, uint uv) |
| Say what Texture Stage use what UV coord. More...
|
virtual bool | render (CPrimitiveBlock &PB, CMaterial &Mat) |
| render a block of primitive with previously setuped VertexBuffer / Matrixes. More...
|
virtual void | renderTriangles (CMaterial &Mat, uint32 *tri, uint32 ntris) |
| render a list of triangles with previously setuped VertexBuffer / Matrixes. More...
|
virtual void | renderSimpleTriangles (uint32 *tri, uint32 ntris) |
| 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) |
| render points with previously setuped VertexBuffer / Matrixes. More...
|
virtual void | renderQuads (CMaterial &Mat, uint32 startIndex, uint32 numQuads) |
| render quads with previously setuped VertexBuffer / Matrixes. More...
|
virtual bool | swapBuffers () |
| Swap the back and front buffers. More...
|
virtual void | profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut) |
| Special : with vertex program, using the extension EXT_vertex_shader, fog is emulated using 1 more constant to scale result to [0, 1]. More...
|
virtual uint32 | profileAllocatedTextureMemory () |
| Return the amount of Texture memory requested. More...
|
virtual uint32 | profileSetupedMaterials () const |
| Get the number of material setuped from the last swapBuffers() call. More...
|
virtual uint32 | profileSetupedModelMatrix () const |
| Get the number of matrix setuped from the last swapBuffers() call. More...
|
void | enableUsedTextureMemorySum (bool enable) |
| Enable the sum of texture memory used since last swapBuffers() call. More...
|
uint32 | getUsedTextureMemory () const |
| Return the amount of texture video memory used since last swapBuffers() call. More...
|
virtual bool | release () |
| Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers). 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 | setupScissor (const class CScissor &scissor) |
| Set the current Scissor. More...
|
virtual void | setupViewport (const class CViewport &viewport) |
| Set the current viewport. 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 bool | isActive () |
| Return true if driver is still active. Return false else. If he user close the window, must return false. More...
|
virtual uint8 | getBitPerPixel () |
| Return the depth of the driver after init(). 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 NLMISC::IMouseDevice * | enableLowLevelMouse (bool enable) |
| Enable / disable low level mouse. More...
|
virtual NLMISC::IKeyboardDevice * | enableLowLevelKeyboard (bool enable) |
| Enable / disable a low level keyboard. More...
|
virtual NLMISC::IInputDeviceManager * | getLowLevelInputDeviceManager () |
| Check wether there is a low level device manager available, and get its interface. 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 void | copyFrameBufferToTexture (ITexture *tex, uint32 level, uint32 offsetx, uint32 offsety, uint32 x, uint32 y, uint32 width, uint32 height) |
| Copy a portion of the FrameBuffer into a texture. More...
|
virtual bool | fillBuffer (CBitmap &bitmap) |
| fill the RGBA back buffer. More...
|
virtual void | setPolygonMode (TPolygonMode mode) |
| Set the global polygon mode. More...
|
virtual uint | getMaxLight () const |
| return the number of light supported by driver. More...
|
virtual void | setLight (uint8 num, const CLight &light) |
| Setup a light. More...
|
virtual void | enableLight (uint8 num, bool enable=true) |
| Enable / disable light. More...
|
virtual void | setPerPixelLightingLight (CRGBA diffuse, CRGBA specular, float shininess) |
| Setup the light used for per pixel lighting. More...
|
virtual void | setAmbientColor (CRGBA color) |
| Set ambiant. More...
|
virtual bool | supportPerPixelLighting (bool specular) const |
virtual void | swapTextureHandle (ITexture &tex0, ITexture &tex1) |
| Special method to internally swap the Driver handle of 2 textures. 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 bool | supportTextureShaders () const |
| 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 |
| test wether a texture addressing mode is supported. More...
|
virtual void | setMatrix2DForTextureOffsetAddrMode (const uint stage, const float mat[4]) |
| setup the 2D matrix for the OffsetTexture, OffsetTextureScale and OffsetTexture addressing mode It should be stored as the following [a0 a1] [a2 a3]. More...
|
|
virtual bool | supportEMBM () const |
virtual bool | isEMBMSupportedAtStage (uint stage) const |
virtual void | setEMBMMatrix (const uint stage, const float mat[4]) |
|
virtual bool | supportBlendConstantColor () const |
| 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) |
| see supportBlendConstantColor(). More...
|
virtual NLMISC::CRGBA | getBlendConstantColor () const |
| see supportBlendConstantColor(). More...
|
virtual bool | setMonitorColorProperties (const CMonitorColorProperties &properties) |
| Setup monitor color properties. More...
|
Private Types |
Private Methods |
void | refreshProjMatrixFromGL () |
bool | setupVertexBuffer (CVertexBuffer &VB) |
bool | activateTexture (uint stage, ITexture *tex) |
void | activateTexEnvMode (uint stage, const CMaterial::CTexEnv &env) |
void | activateTexEnvColor (uint stage, const CMaterial::CTexEnv &env) |
void | forceActivateTexEnvMode (uint stage, const CMaterial::CTexEnv &env) |
void | activateTexEnvColor (uint stage, NLMISC::CRGBA col) |
void | forceActivateTexEnvColor (uint stage, NLMISC::CRGBA col) |
void | forceActivateTexEnvColor (uint stage, const CMaterial::CTexEnv &env) |
void | enableNVTextureShader (bool enabled) |
| nv texture shaders. Should be used only if this caps is present! More...
|
void | verifyNVTextureShaderConfig () |
void | cleanLightSetup () |
GLint | getGlTextureFormat (ITexture &tex, bool &compressed) |
bool | clipRect (NLMISC::CRect &rect) |
void | setupUVPtr (uint stage, CVertexBufferInfo &VB, uint uvId) |
| setup a texture stage with an UV from VB. More...
|
sint | beginCloudMultiPass () |
void | setupCloudPass (uint pass) |
void | endCloudMultiPass () |
void | setupGlArrays (CVertexBufferInfo &vb) |
| setup GL arrays, with a vb info. More...
|
void | setupGlArraysStd (CVertexBufferInfo &vb) |
| Tools fct used by setupGLArrays. More...
|
void | setupGlArraysForNVVertexProgram (CVertexBufferInfo &vb) |
void | setupGlArraysForEXTVertexShader (CVertexBufferInfo &vb) |
void | toggleGlArraysForNVVertexProgram () |
void | toggleGlArraysForEXTVertexShader () |
void | enableGlNormalize (bool normalize) |
| Test/activate normalisation of normal. More...
|
void | refreshRenderSetup () |
void | doRefreshRenderSetup () |
bool | isVertexProgramEnabled () const |
sint | inlGetNumTextStages () const |
| Same as getNbTextureStages(), but faster because inline, and not virtual!! More...
|
void | initEMBM () |
|
sint | beginSpecularMultiPass () |
void | setupSpecularPass (uint pass) |
void | endSpecularMultiPass () |
|
bool | isVertexProgramSupported () const |
| Does the driver supports vertex programs ? More...
|
bool | isVertexProgramEmulated () const |
| Does the driver supports vertex program, but emulated by CPU ? More...
|
bool | activeVertexProgram (CVertexProgram *program) |
| Activate / disactivate a vertex program. More...
|
void | setConstant (uint index, float, float, float, float) |
| Setup constant values. More...
|
void | setConstant (uint index, double, double, double, double) |
void | setConstant (uint indexStart, const NLMISC::CVector &value) |
void | setConstant (uint indexStart, const NLMISC::CVectorD &value) |
void | setConstant (uint index, uint num, const float *src) |
| setup several 4 float csts taken from the given tab. More...
|
void | setConstant (uint index, uint num, const double *src) |
| setup several 4 double csts taken from the given tab. More...
|
void | setConstantMatrix (uint index, IDriver::TMatrix matrix, IDriver::TTransform transform) |
void | enableVertexProgramDoubleSidedColor (bool doubleSided) |
| Activate VertexProgram 2Sided Color mode. More...
|
bool | supportVertexProgramDoubleSidedColor () const |
| Check if the driver support double sided colors vertex programs. More...
|
|
bool | activeNVVertexProgram (CVertexProgram *program) |
bool | activeEXTVertexShader (CVertexProgram *program) |
| Don't know why, but on some implementation of EXT_vertex_shader, can't write a single components to the fog coordinate.. More...
|
|
CMaterial::TShader | getSupportedShader (CMaterial::TShader shader) |
| test wether the given shader is supported, and gives back a supported shader. More...
|
Private Attributes |
bool | _FullScreen |
bool | _OffScreen |
bool | _Initialized |
uint8 | _Depth |
bool | _ForceNormalize |
bool | _LightSetupDirty |
bool | _ModelViewMatrixDirty |
bool | _ProjMatDirty |
NLMISC::CMatrix | _GLProjMat |
bool | _RenderSetupDirty |
float | _OODeltaZ |
CMatrix | _UserViewMtx |
CMatrix | _ViewMtx |
CMatrix | _TexMtx |
CVector | _PZBCameraPos |
CMatrix | _ModelViewMatrix |
bool | _FogEnabled |
GLfloat | _CurrentFogColor [4] |
uint | _MaxDriverLight |
bool | _LightEnable [MaxLight] |
uint | _LightMode [MaxLight] |
CVector | _WorldLightPos [MaxLight] |
CVector | _WorldLightDirection [MaxLight] |
bool | _CurrentGlNormalize |
bool | _VertexProgramEnabled |
bool | _LastSetupGLArrayVertexProgram |
NLMISC::CRefPtr< CVertexProgram > | _LastSetuppedVP |
bool | _ForceDXTCCompression |
uint | _ForceTextureResizePower |
| Divisor for textureResize (power). More...
|
NLMISC::CMatrix | _UserTexMat [IDRV_MAT_MAXTEXTURES] |
uint | _UserTexMatEnabled |
NLMISC::CRGBA | _CurrentBlendConstantColor |
|
CGlExtensions | _Extensions |
Static Private Attributes |
const uint32 | ReleaseVersion = 0x8 |
const uint | NumCoordinatesType [CVertexBuffer::NumType] |
const uint | GLType [CVertexBuffer::NumType] |
const uint | GLVertexAttribIndex [CVertexBuffer::NumValue] |
const uint | GLMatrix [IDriver::NumMatrix] |
const uint | GLTransform [IDriver::NumTransform] |
Friends |
class | CTextureDrvInfosGL |
class | CVertexProgamDrvInfosGL |
Member Typedef Documentation
typedef std::vector<TSPTextureCube> NL3D::CDriverGL::TTexCubeVect [private]
|
|
Member Enumeration Documentation
enum NL3D::CDriverGL::CTexEnvSpecial [private]
|
|
|
-
Enumeration values:
-
TexEnvSpecialDisabled |
|
TexEnvSpecialLightMap |
|
TexEnvSpecialSpecularStage0 |
|
TexEnvSpecialSpecularStage1 |
|
TexEnvSpecialSpecularStage1NoText |
|
TexEnvSpecialPPLStage0 |
|
TexEnvSpecialPPLStage2 |
|
TexEnvSpecialCloudStage0 |
|
TexEnvSpecialCloudStage1 |
|
Definition at line 577 of file driver_opengl.h.
Referenced by setupSpecularPass. |
enum NL3D::CDriverGL::EEVSVariants
|
|
|
-
Enumeration values:
-
EVSSecondaryColorVariant |
|
EVSFogCoordsVariant |
|
EVSSkinWeightVariant |
|
EVSPaletteSkinVariant |
|
EVSNumVariants |
|
Definition at line 922 of file driver_opengl.h. |
Constructor & Destructor Documentation
NL3D::CDriverGL::CDriverGL |
( |
|
) |
|
|
|
Definition at line 172 of file driver_opengl.cpp.
References _AGPVertexArrayRange, _AllocatedTextureMemory, _CurrentFogColor, _CurrentGlNormalize, _CurrentMaterial, _CurrentTexAddrMode, _CurrentVertexArrayRange, _CurrentVertexBufferHard, _FogEnabled, _ForceDXTCCompression, _ForceNormalize, _ForceTextureResizePower, _FullScreen, _Initialized, _LastVertexSetupIsLightMap, _LightMapLastStageEnv, _LightMapLUT, _LightMapUVMap, _LightSetupDirty, _MaterialAllTextureTouchedFlag, _MaxVerticesByVBHard, _ModelViewMatrixDirty, _NVCurrentVARPtr, _NVCurrentVARSize, _NVTextureShaderEnabled, _OffScreen, _ProjMatDirty, _RenderSetupDirty, _SlowUnlockVBHard, _StageSupportEMBM, _SumTextureMemoryUsed, _SupportVBHard, _UserTexMatEnabled, _VRAMVertexArrayRange, NL3D::IDRV_MAT_MAXTEXTURES, NL3D::IDRV_TOUCHED_TEX, and NL3D_DRV_MAX_LIGHTMAP. |
NL3D::CDriverGL::~CDriverGL |
( |
|
) |
[virtual] |
|
Member Function Documentation
bool NL3D::CDriverGL::activate |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::activateTexEnvColor |
( |
uint |
stage, |
|
|
NLMISC::CRGBA |
col |
|
) |
[private] |
|
bool NL3D::CDriverGL::activateTexture |
( |
uint |
stage, |
|
|
ITexture * |
tex |
|
) |
[private] |
|
|
Definition at line 884 of file driver_opengl_texture.cpp.
References _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _TextureUsed, CTextureDrvInfosGL, NL3D::getTextureGl, NL3D::translateMagFilterToGl, NL3D::translateMinFilterToGl, and NL3D::translateWrapToGl.
Referenced by setupCloudPass, setupLightMapPass, setupMaterial, setupPPLNoSpecPass, setupPPLPass, setupTextureEx, and swapTextureHandle. |
bool NL3D::CDriverGL::activeEXTVertexShader |
( |
CVertexProgram * |
program |
) |
[private] |
|
|
Don't know why, but on some implementation of EXT_vertex_shader, can't write a single components to the fog coordinate..
So we force the mask to 0xf (only the x coordinate is used anyway).
Definition at line 1095 of file driver_opengl_vertex_program.cpp.
References _LastSetuppedVP, _VertexProgramEnabled, NL3D::IDriver::_VtxPrgDrvInfos, CVertexProgamDrvInfosGL, GL_VERTEX_SHADER_EXT, NL3D::ItVtxPrgDrvInfoPtrList, NL3D::IDriver::IVertexProgramDrvInfos, nglBindVertexShaderEXT, nlerror, nlwarning, CVPParser::parse, program, setupEXTVertexShader, and CVPParser::TProgram.
Referenced by activeVertexProgram. |
bool NL3D::CDriverGL::activeNVVertexProgram |
( |
CVertexProgram * |
program |
) |
[private] |
|
|
Definition at line 78 of file driver_opengl_vertex_program.cpp.
References _LastSetuppedVP, _VertexProgramEnabled, NL3D::IDriver::_VtxPrgDrvInfos, CVertexProgamDrvInfosGL, GL_PROGRAM_ERROR_POSITION_NV, GL_VERTEX_PROGRAM_NV, NL3D::ItVtxPrgDrvInfoPtrList, NL3D::IDriver::IVertexProgramDrvInfos, nglBindProgramNV, nglLoadProgramNV, nlassert, nlinfo, nlwarning, offset, CVPParser::parse, program, and CVPParser::TProgram.
Referenced by activeVertexProgram. |
bool NL3D::CDriverGL::activeVertexBuffer |
( |
CVertexBuffer & |
VB |
) |
[virtual] |
|
bool NL3D::CDriverGL::activeVertexProgram |
( |
CVertexProgram * |
program |
) |
[private, virtual] |
|
sint NL3D::CDriverGL::beginCloudMultiPass |
( |
|
) |
[private] |
|
sint NL3D::CDriverGL::beginLightMapMultiPass |
( |
|
) |
[private] |
|
sint NL3D::CDriverGL::beginMultiPass |
( |
|
) |
[private] |
|
sint NL3D::CDriverGL::beginPPLMultiPass |
( |
|
) |
[private] |
|
sint NL3D::CDriverGL::beginPPLNoSpecMultiPass |
( |
|
) |
[private] |
|
sint NL3D::CDriverGL::beginSpecularMultiPass |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::checkForPerPixelLightingSupport |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::cleanLightSetup |
( |
|
) |
[private] |
|
bool NL3D::CDriverGL::clear2D |
( |
CRGBA |
rgba |
) |
[virtual] |
|
bool NL3D::CDriverGL::clearZBuffer |
( |
float |
zval = 1 |
) |
[virtual] |
|
bool NL3D::CDriverGL::clipRect |
( |
NLMISC::CRect & |
rect |
) |
[private] |
|
|
Definition at line 1832 of file driver_opengl.cpp.
References NLMISC::CRect::bottom, NLMISC::clamp, getWindowSize, NLMISC::CRect::Height, height, NLMISC::CRect::right, NLMISC::CRect::Width, width, NLMISC::CRect::X, and NLMISC::CRect::Y.
Referenced by getBufferPart, and getZBufferPart. |
void NL3D::CDriverGL::computeLightMapInfos |
( |
const CMaterial & |
mat |
) |
[private] |
|
uint NL3D::CDriverGL::computeMipMapMemoryUsage |
( |
uint |
w, |
|
|
uint |
h, |
|
|
GLint |
glfmt |
|
) |
const [private] |
|
|
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. |
Implements NL3D::IDriver.
Definition at line 1907 of file driver_opengl.cpp.
References _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, CTextureDrvInfosGL, getGlTextureFormat, height, NL3D::IDriver::ITextureDrvInfos, level, nlassert, setupTexture, width, x, and y. |
void NL3D::CDriverGL::disableHardwareTextureShader |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::disableHardwareVertexArrayAGP |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::disableHardwareVertexProgram |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::disableUserTextureMatrix |
( |
|
) |
|
|
void NL3D::CDriverGL::doRefreshRenderSetup |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::enableFog |
( |
bool |
enable |
) |
[virtual] |
|
void NL3D::CDriverGL::enableGlNormalize |
( |
bool |
normalize |
) |
[inline, private] |
|
void NL3D::CDriverGL::enableLight |
( |
uint8 |
num, |
|
|
bool |
enable = true |
|
) |
[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
Implements NL3D::IDriver.
Definition at line 2176 of file driver_opengl.cpp. |
|
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
Implements NL3D::IDriver.
Definition at line 2148 of file driver_opengl.cpp. |
void NL3D::CDriverGL::enableNVTextureShader |
( |
bool |
enabled |
) |
[private] |
|
void NL3D::CDriverGL::enableUsedTextureMemorySum |
( |
bool |
enable |
) |
[virtual] |
|
void NL3D::CDriverGL::enableVertexProgramDoubleSidedColor |
( |
bool |
doubleSided |
) |
[private, virtual] |
|
void NL3D::CDriverGL::endCloudMultiPass |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::endLightMapMultiPass |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::endMultiPass |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::endPPLMultiPass |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::endPPLNoSpecMultiPass |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::endSpecularMultiPass |
( |
|
) |
[private] |
|
ModeList NL3D::CDriverGL::enumModes |
( |
|
) |
[virtual] |
|
bool NL3D::CDriverGL::fillBuffer |
( |
CBitmap & |
bitmap |
) |
[virtual] |
|
bool NL3D::CDriverGL::fogEnabled |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::forceActivateTexEnvColor |
( |
uint |
stage, |
|
|
const CMaterial::CTexEnv & |
env |
|
) |
[inline, private] |
|
void NL3D::CDriverGL::forceActivateTexEnvColor |
( |
uint |
stage, |
|
|
NLMISC::CRGBA |
col |
|
) |
[inline, private] |
|
void NL3D::CDriverGL::forceDXTCCompression |
( |
bool |
dxtcComp |
) |
[virtual] |
|
virtual void NL3D::CDriverGL::forceNormalize |
( |
bool |
normalize |
) |
[inline, virtual] |
|
void NL3D::CDriverGL::forceTextureResize |
( |
uint |
divisor |
) |
[virtual] |
|
uint8 NL3D::CDriverGL::getBitPerPixel |
( |
|
) |
[virtual] |
|
NLMISC::CRGBA NL3D::CDriverGL::getBlendConstantColor |
( |
|
) |
const [virtual] |
|
void NL3D::CDriverGL::getBuffer |
( |
CBitmap & |
bitmap |
) |
[virtual] |
|
void NL3D::CDriverGL::getBufferPart |
( |
CBitmap & |
bitmap, |
|
|
NLMISC::CRect & |
rect |
|
) |
[virtual] |
|
CTextureCube* NL3D::CDriverGL::getDiffuseCubeMap |
( |
|
) |
[inline, private] |
|
virtual void* NL3D::CDriverGL::getDisplay |
( |
|
) |
[inline, virtual] |
|
virtual const char* NL3D::CDriverGL::getDriverInformation |
( |
|
) |
[inline, virtual] |
|
|
Get driver informations.
get the nel name of the driver (ex: "Opengl 1.2 NeL Driver")
Implements NL3D::IDriver.
Definition at line 358 of file driver_opengl.h. |
GLint NL3D::CDriverGL::getGlTextureFormat |
( |
ITexture & |
tex, |
|
|
bool & |
compressed |
|
) |
[private] |
|
uint32 NL3D::CDriverGL::getHwnd |
( |
|
) |
[inline] |
|
virtual uint32 NL3D::CDriverGL::getImplementationVersion |
( |
|
) |
const [inline, 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 ...)
Implements NL3D::IDriver.
Definition at line 2204 of file driver_opengl.cpp. |
uint NL3D::CDriverGL::getMaxLight |
( |
|
) |
const [virtual] |
|
uint NL3D::CDriverGL::getMaxVerticesByVertexBufferHard |
( |
|
) |
const [virtual] |
|
sint NL3D::CDriverGL::getNbTextureStages |
( |
|
) |
const [virtual] |
|
uint32 NL3D::CDriverGL::getUsedTextureMemory |
( |
|
) |
const [virtual] |
|
const char * NL3D::CDriverGL::getVideocardInformation |
( |
|
) |
[virtual] |
|
CMatrix NL3D::CDriverGL::getViewMatrix |
( |
|
) |
const [virtual] |
|
emptyProc NL3D::CDriverGL::getWindowProc |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::getWindowSize |
( |
uint32 & |
width, |
|
|
uint32 & |
height |
|
) |
[virtual] |
|
void NL3D::CDriverGL::getZBuffer |
( |
std::vector< float > & |
zbuffer |
) |
[virtual] |
|
void NL3D::CDriverGL::getZBufferPart |
( |
std::vector< float > & |
zbuffer, |
|
|
NLMISC::CRect & |
rect |
|
) |
[virtual] |
|
bool NL3D::CDriverGL::init |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::initCausticCubeMap |
( |
|
) |
[static, private] |
|
void NL3D::CDriverGL::initEMBM |
( |
|
) |
[private] |
|
bool NL3D::CDriverGL::initVertexArrayRange |
( |
uint |
agpMem, |
|
|
uint |
vramMem |
|
) |
[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).
Implements NL3D::IDriver.
Definition at line 1069 of file driver_opengl_vertex.cpp.
References _AGPVertexArrayRange, _MaxVerticesByVBHard, _VRAMVertexArrayRange, NL3D_DRV_VERTEXARRAY_MINIMUM_SIZE, nlinfo, resetVertexArrayRange, and supportVertexBufferHard. |
sint NL3D::CDriverGL::inlGetNumTextStages |
( |
|
) |
const [inline, private] |
|
|
Same as getNbTextureStages(), but faster because inline, and not virtual!!
Definition at line 908 of file driver_opengl.h.
References _Extensions.
Referenced by computeLightMapInfos, getNbTextureStages, getSupportedShader, resetLightMapVertexSetup, resetTextureShaders, setMatrix2DForTextureOffsetAddrMode, setupGlArraysStd, setupLightMapPass, setupMaterial, setupPPLNoSpecPass, setupPPLPass, setupTextureEx, swapBuffers, swapTextureHandle, toggleGlArraysForEXTVertexShader, and toggleGlArraysForNVVertexProgram. |
bool NL3D::CDriverGL::isActive |
( |
|
) |
[virtual] |
|
|
Return true if driver is still active. Return false else. If he user close the window, must return false.
Implements NL3D::IDriver.
Definition at line 1766 of file driver_opengl.cpp. |
bool NL3D::CDriverGL::isEMBMSupportedAtStage |
( |
uint |
stage |
) |
const [virtual] |
|
virtual bool NL3D::CDriverGL::isForceNormalize |
( |
|
) |
const [inline, virtual] |
|
bool NL3D::CDriverGL::isTextureExist |
( |
const ITexture & |
tex |
) |
[virtual] |
|
bool NL3D::CDriverGL::isVertexProgramEmulated |
( |
|
) |
const [private, virtual] |
|
bool NL3D::CDriverGL::isVertexProgramEnabled |
( |
|
) |
const [inline, private] |
|
bool NL3D::CDriverGL::isVertexProgramSupported |
( |
|
) |
const [private, virtual] |
|
void NL3D::CDriverGL::mapTextureStageToUV |
( |
uint |
stage, |
|
|
uint |
uv |
|
) |
[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.
Implements NL3D::IDriver.
Definition at line 362 of file driver_opengl_vertex.cpp.
References _LastVB, and setupUVPtr. |
void NL3D::CDriverGL::multiplyModelMatrix |
( |
const CMatrix & |
mtx |
) |
[virtual] |
|
uint32 NL3D::CDriverGL::profileAllocatedTextureMemory |
( |
|
) |
[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 :).
Implements NL3D::IDriver.
Definition at line 2010 of file driver_opengl.cpp.
References _AllocatedTextureMemory. |
uint32 NL3D::CDriverGL::profileSetupedMaterials |
( |
|
) |
const [virtual] |
|
uint32 NL3D::CDriverGL::profileSetupedModelMatrix |
( |
|
) |
const [virtual] |
|
void NL3D::CDriverGL::refreshProjMatrixFromGL |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::refreshRenderSetup |
( |
|
) |
[inline, private] |
|
bool NL3D::CDriverGL::release |
( |
|
) |
[virtual] |
|
void NL3D::CDriverGL::renderPoints |
( |
CMaterial & |
Mat, |
|
|
uint32 |
numPoints |
|
) |
[virtual] |
|
void NL3D::CDriverGL::renderSimpleTriangles |
( |
uint32 * |
tri, |
|
|
uint32 |
ntris |
|
) |
[virtual] |
|
void NL3D::CDriverGL::resetLightMapVertexSetup |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::resetTextureShaders |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::resetVertexArrayRange |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::setAmbientColor |
( |
CRGBA |
color |
) |
[virtual] |
|
void NL3D::CDriverGL::setBlendConstantColor |
( |
NLMISC::CRGBA |
col |
) |
[virtual] |
|
void NL3D::CDriverGL::setCapture |
( |
bool |
b |
) |
[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
Implements NL3D::IDriver.
Definition at line 1795 of file driver_opengl.cpp. |
void NL3D::CDriverGL::setColorMask |
( |
bool |
bRed, |
|
|
bool |
bGreen, |
|
|
bool |
bBlue, |
|
|
bool |
bAlpha |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setConstant |
( |
uint |
index, |
|
|
uint |
num, |
|
|
const double * |
src |
|
) |
[private, virtual] |
|
void NL3D::CDriverGL::setConstant |
( |
uint |
index, |
|
|
uint |
num, |
|
|
const float * |
src |
|
) |
[private, virtual] |
|
void NL3D::CDriverGL::setConstant |
( |
uint |
indexStart, |
|
|
const NLMISC::CVectorD & |
value |
|
) |
[private, virtual] |
|
void NL3D::CDriverGL::setConstant |
( |
uint |
indexStart, |
|
|
const NLMISC::CVector & |
value |
|
) |
[private, virtual] |
|
void NL3D::CDriverGL::setConstant |
( |
uint |
index, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
, |
|
|
double |
|
|
) |
[private, virtual] |
|
void NL3D::CDriverGL::setConstant |
( |
uint |
index, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
[private, virtual] |
|
|
Definition at line 1313 of file driver_opengl_vertex_program.cpp.
References _EVSConstantHandle, _Extensions, _GLProjMat, _ModelViewMatrix, GL_IDENTITY_NV, GL_VERTEX_PROGRAM_NV, GLMatrix, GLTransform, index, matrix, nglSetInvariantEXT, nglTrackMatrixNV, refreshProjMatrixFromGL, refreshRenderSetup, and transform. |
bool NL3D::CDriverGL::setDisplay |
( |
void * |
wnd, |
|
|
const GfxMode & |
mode |
|
) |
throw (EBadDisplay) [virtual] |
|
|
Implements NL3D::IDriver.
Definition at line 358 of file driver_opengl.cpp.
References GL_CURRENT_VERTEX_EXT, GL_FULL_RANGE_EXT, GL_INVARIANT_EXT, GL_VECTOR_EXT, height, nglBindParameterEXT, nglBindTextureUnitParameterEXT, nglGenSymbolsEXT, NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, nldebug, nlerror, nlinfo, nlwarning, NL3D::registerGlExtensions, WGL_ALPHA_BITS_ARB, WGL_BLUE_BITS_ARB, WGL_DEPTH_BITS_ARB, WGL_DRAW_TO_PBUFFER_ARB, WGL_GREEN_BITS_ARB, WGL_PBUFFER_HEIGHT_ARB, WGL_PBUFFER_WIDTH_ARB, WGL_RED_BITS_ARB, NLMISC::CRGBA::White, and width. |
void NL3D::CDriverGL::setEMBMMatrix |
( |
const uint |
stage, |
|
|
const float |
mat[4] |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setFrustum |
( |
float |
left, |
|
|
float |
right, |
|
|
float |
bottom, |
|
|
float |
top, |
|
|
float |
znear, |
|
|
float |
zfar, |
|
|
bool |
perspective = true |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setLight |
( |
uint8 |
num, |
|
|
const CLight & |
light |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setMatrix2DForTextureOffsetAddrMode |
( |
const uint |
stage, |
|
|
const float |
mat[4] |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setMousePos |
( |
float |
x, |
|
|
float |
y |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setPerPixelLightingLight |
( |
CRGBA |
diffuse, |
|
|
CRGBA |
specular, |
|
|
float |
shininess |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setPolygonMode |
( |
TPolygonMode |
mode |
) |
[virtual] |
|
void NL3D::CDriverGL::setTextureEnvFunction |
( |
uint |
stage, |
|
|
CMaterial & |
mat |
|
) |
|
|
void NL3D::CDriverGL::setupCloudPass |
( |
uint |
pass |
) |
[private] |
|
bool NL3D::CDriverGL::setupEXTVertexShader |
( |
const CVPParser::TProgram & |
program, |
|
|
GLuint |
id, |
|
|
uint |
variants[EVSNumVariants], |
|
|
uint16 & |
usedInputRegisters |
|
) |
[private] |
|
|
Setup a vertex shader from its parsed program.
Definition at line 371 of file driver_opengl_vertex_program.cpp.
References _EVSColorHandle, _EVSConstantHandle, _EVSNormalHandle, _EVSPositionHandle, _EVSTexHandle, CVPInstruction::ADD, CVPOperand::AddressRegister, CVPInstruction::ARL, CVPSwizzle::Comp, CVPOperand::Constant, NL3D::convInputRegisterToVBFlag, NL3D::convOutputRegisterToEXTVertexShader, NL3D::convSwizzleToGLFormat, NL3D::doSwizzle, NL3D::doWriteMask, CVPInstruction::DP3, CVPInstruction::DP4, CVPInstruction::DST, CVPInstruction::EOpcode, EVS_INFO, EVSFogCoordsVariant, EVSNumVariants, EVSPaletteSkinVariant, EVSSecondaryColorVariant, EVSSkinWeightVariant, CVPInstruction::EXPP, GL_FULL_RANGE_EXT, GL_LOCAL_CONSTANT_EXT, GL_LOCAL_EXT, GL_NORMALIZED_RANGE_EXT, GL_ONE_EXT, GL_OP_ADD_EXT, GL_OP_CLAMP_EXT, GL_OP_DOT3_EXT, GL_OP_DOT4_EXT, GL_OP_EXP_BASE_2_EXT, GL_OP_FLOOR_EXT, GL_OP_FRAC_EXT, GL_OP_INDEX_EXT, GL_OP_LOG_BASE_2_EXT, GL_OP_MADD_EXT, GL_OP_MAX_EXT, GL_OP_MIN_EXT, GL_OP_MOV_EXT, GL_OP_MUL_EXT, GL_OP_NEGATE_EXT, GL_OP_POWER_EXT, GL_OP_RECIP_EXT, GL_OP_RECIP_SQRT_EXT, GL_OP_SET_GE_EXT, GL_OP_SET_LT_EXT, GL_OUTPUT_COLOR0_EXT, GL_OUTPUT_COLOR1_EXT, GL_OUTPUT_FOG_EXT, GL_OUTPUT_TEXTURE_COORD0_EXT, GL_OUTPUT_TEXTURE_COORD7_EXT, GL_SCALAR_EXT, GL_VARIANT_EXT, GL_VECTOR_EXT, GL_VERTEX_SHADER_OPTIMIZED_EXT, GL_W_EXT, GL_X_EXT, GL_Y_EXT, GL_Z_EXT, GL_ZERO_EXT, GLboolean, GLuint, id, index, CVPOperand::Indexed, CVPOperand::InputRegister, CVPSwizzle::isIdentity, CVPSwizzle::isScalar, NLAISCRIPT::l, CVPInstruction::LIT, CVPInstruction::LOG, CVPInstruction::MAD, CVPInstruction::MAX, CVPInstruction::MIN, CVPInstruction::MOV, CVPInstruction::MUL, CVPOperand::Negate, nglBeginVertexShaderEXT, nglBindVertexShaderEXT, nglEndVertexShaderEXT, nglExtractComponentEXT, nglGenSymbolsEXT, nglInsertComponentEXT, nglSetLocalConstantEXT, nglShaderOp1EXT, nglShaderOp2EXT, nglShaderOp3EXT, nlassert, nlinfo, nlstop, nlwarning, CVPOperand::OFogCoord, CVPOperand::OHPosition, CVPOperand::OPrimaryColor, CVPOperand::OSecondaryColor, CVPOperand::OutputRegister, program, CVPInstruction::RCP, CVPInstruction::RSQ, CVPInstruction::SGE, CVPInstruction::SLT, CVPOperand::Swizzle, CVPParser::TProgram, CVPOperand::Type, CVPOperand::Value, CVPOperand::Variable, and CVPOperand::WriteMask.
Referenced by activeEXTVertexShader. |
void NL3D::CDriverGL::setupFog |
( |
float |
start, |
|
|
float |
end, |
|
|
CRGBA |
color |
|
) |
[virtual] |
|
void NL3D::CDriverGL::setupGlArraysForEXTVertexShader |
( |
CVertexBufferInfo & |
vb |
) |
[private] |
|
|
Definition at line 802 of file driver_opengl_vertex.cpp.
References _DriverGLStates, _LastSetuppedVP, CVertexProgamDrvInfosGL, GLType, GLVertexAttribIndex, NL3D::IDriver::IVertexProgramDrvInfos, nglArrayObjectATI, nglVariantArrayObjectATI, nglVariantPointerEXT, nlassert, nlstop, NumCoordinatesType, type, and value.
Referenced by setupGlArrays. |
void NL3D::CDriverGL::setupGlArraysForNVVertexProgram |
( |
CVertexBufferInfo & |
vb |
) |
[private] |
|
void NL3D::CDriverGL::setupLightMapPass |
( |
uint |
pass |
) |
[private] |
|
|
Definition at line 621 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, _FogEnabled, _LastVB, _LastVertexSetupIsLightMap, _LightMapLastStageEnv, _LightMapLUT, _LightMapUVMap, _NLightMapPass, _NLightMapPerPass, _NLightMaps, activateTexEnvColor, activateTexEnvMode, activateTexture, GL_MODULATE_ADD_ATIX, inlGetNumTextStages, min, nlassert, setupUVPtr, and TexEnvSpecialLightMap.
Referenced by setupPass. |
bool NL3D::CDriverGL::setupMaterial |
( |
CMaterial & |
mat |
) |
[virtual] |
|
|
For objects with caustics, setup the first texture (which actually is the one from the material).
Implements NL3D::IDriver.
Definition at line 225 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentMaterialSupportedShader, _CurrentTexAddrMode, _DriverGLStates, _Extensions, _LastVertexSetupIsLightMap, _NbSetupMaterialCall, _OODeltaZ, NL3D::IDriver::_Shaders, activateTexture, NL3D::convBlend, NL3D::convColor, NL3D::convTexAddr, NL3D::convZFunction, disableUserTextureMatrix, enableNVTextureShader, getSupportedShader, GL_SHADER_OPERATION_NV, GL_TEXTURE_SHADER_NV, NL3D::IDRV_MAT_ALPHA_TEST, NL3D::IDRV_MAT_BLEND, NL3D::IDRV_MAT_DOUBLE_SIDED, NL3D::IDRV_MAT_LIGHTING, NL3D::IDRV_MAT_TEX_ADDR, NL3D::IDRV_MAT_ZWRITE, NL3D::IDRV_TOUCHED_ALL, NL3D::IDRV_TOUCHED_BLENDFUNC, NL3D::IDRV_TOUCHED_LIGHTING, NL3D::IDRV_TOUCHED_SHADER, NL3D::IDRV_TOUCHED_ZFUNC, inlGetNumTextStages, NL3D::IDriver::IShader, NL3D::ItShaderPtrList, resetLightMapVertexSetup, setTextureEnvFunction, setupTexture, and setupUserTextureMatrix.
Referenced by render, renderPoints, renderQuads, and renderTriangles. |
void NL3D::CDriverGL::setupModelMatrix |
( |
const CMatrix & |
mtx |
) |
[virtual] |
|
void NL3D::CDriverGL::setupPass |
( |
uint |
pass |
) |
[private] |
|
void NL3D::CDriverGL::setupPPLNoSpecPass |
( |
uint |
pass |
) |
[private] |
|
|
Definition at line 1469 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, _PPLightDiffuseColor, activateTexEnvColor, activateTexEnvMode, activateTexture, getSpecularCubeMap, GL_MODULATE_ADD_ATIX, inlGetNumTextStages, nlassert, setupTexture, and TexEnvSpecialPPLStage0.
Referenced by setupPass. |
void NL3D::CDriverGL::setupPPLPass |
( |
uint |
pass |
) |
[private] |
|
|
Definition at line 1284 of file driver_opengl_material.cpp.
References _CurrentMaterial, _CurrentTexEnvSpecial, _DriverGLStates, _Extensions, _PPLightDiffuseColor, _PPLightSpecularColor, activateTexEnvColor, activateTexEnvMode, activateTexture, getSpecularCubeMap, GL_MODULATE_ADD_ATIX, inlGetNumTextStages, nlassert, setupTexture, TexEnvSpecialPPLStage0, and TexEnvSpecialPPLStage2.
Referenced by setupPass. |
void NL3D::CDriverGL::setupScissor |
( |
const class CScissor & |
scissor |
) |
[virtual] |
|
void NL3D::CDriverGL::setupSpecularPass |
( |
uint |
pass |
) |
[private] |
|
bool NL3D::CDriverGL::setupTexture |
( |
ITexture & |
tex |
) |
[virtual] |
|
bool NL3D::CDriverGL::setupTextureEx |
( |
ITexture & |
tex, |
|
|
bool |
bUpload, |
|
|
bool & |
bAllUploaded, |
|
|
bool |
bMustRecreateSharedTexture = false |
|
) |
[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. |
Implements NL3D::IDriver.
Definition at line 319 of file driver_opengl_texture.cpp.
References _AllocatedTextureMemory, _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _ForceTextureResizePower, NL3D::IDriver::_SyncTexDrvInfos, NL3D::IDriver::_TexDrvShares, activateTexture, NLMISC::clamp, computeMipMapMemoryUsage, CTextureDrvInfosGL, NL3D::IDriver::CTextureDrvShare, NL3D::getGlSrcTextureComponentType, NL3D::getGlSrcTextureFormat, getGlTextureFormat, NL3D::getTextureGl, NL3D::IDriver::getTextureShareName, inlGetNumTextStages, NL3D::IDriver::ITextureDrvInfos, NL3D::ItTexDrvInfoPtrMap, NL3D::ItTexDrvSharePtrList, min, nglCompressedTexImage2DARB, NL3D::sameDXTCFormat, NL3D::translateMagFilterToGl, NL3D::translateMinFilterToGl, NL3D::translateWrapToGl, and w.
Referenced by setupTexture. |
void NL3D::CDriverGL::setupUserTextureMatrix |
( |
uint |
numStages, |
|
|
CMaterial & |
mat |
|
) |
|
|
bool NL3D::CDriverGL::setupVertexBuffer |
( |
CVertexBuffer & |
VB |
) |
[private] |
|
void NL3D::CDriverGL::setupViewMatrix |
( |
const CMatrix & |
mtx |
) |
[virtual] |
|
void NL3D::CDriverGL::setupViewMatrixEx |
( |
const CMatrix & |
mtx, |
|
|
const CVector & |
cameraPos |
|
) |
[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 ). |
Implements NL3D::IDriver.
Definition at line 53 of file driver_opengl_matrix.cpp.
References _LightSetupDirty, _ModelViewMatrixDirty, _PZBCameraPos, _RenderSetupDirty, _TexMtx, _UserViewMtx, and _ViewMtx. |
void NL3D::CDriverGL::setupViewport |
( |
const class CViewport & |
viewport |
) |
[virtual] |
|
void NL3D::CDriverGL::showCursor |
( |
bool |
b |
) |
[virtual] |
|
bool NL3D::CDriverGL::slowUnlockVertexBufferHard |
( |
|
) |
const [virtual] |
|
bool NL3D::CDriverGL::supportBlendConstantColor |
( |
|
) |
const [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.
Implements NL3D::IDriver.
Definition at line 2216 of file driver_opengl.cpp.
References _Extensions. |
bool NL3D::CDriverGL::supportEMBM |
( |
|
) |
const [virtual] |
|
bool NL3D::CDriverGL::supportPerPixelLighting |
( |
bool |
specular |
) |
const [virtual] |
|
bool NL3D::CDriverGL::supportTextureShaders |
( |
|
) |
const [virtual] |
|
bool NL3D::CDriverGL::supportVertexBufferHard |
( |
|
) |
const [virtual] |
|
bool NL3D::CDriverGL::supportVertexProgramDoubleSidedColor |
( |
|
) |
const [private, virtual] |
|
bool NL3D::CDriverGL::swapBuffers |
( |
|
) |
[virtual] |
|
|
Swap the back and front buffers.
Implements NL3D::IDriver.
Definition at line 1324 of file driver_opengl.cpp.
References _CurrentMaterial, _CurrentTexture, _CurrentTextureInfoGL, _CurrentVertexBufferHard, _DriverGLStates, _NbSetupMaterialCall, _NbSetupModelMatrixCall, _NVTextureShaderEnabled, _PrimitiveProfileIn, _PrimitiveProfileOut, _TextureUsed, _VertexBufferHardSet, activeVertexBuffer, CVertexBufferHardGLNVidia, forceActivateTexEnvColor, forceActivateTexEnvMode, GL_TEXTURE_SHADER_NV, and inlGetNumTextStages. |
void NL3D::CDriverGL::swapTextureHandle |
( |
ITexture & |
tex0, |
|
|
ITexture & |
tex1 |
|
) |
[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::IDriver. |
void NL3D::CDriverGL::toggleGlArraysForEXTVertexShader |
( |
|
) |
[private] |
|
void NL3D::CDriverGL::toggleGlArraysForNVVertexProgram |
( |
|
) |
[private] |
|
|
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);
Implements NL3D::IDriver.
Definition at line 746 of file driver_opengl_texture.cpp.
References _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _ForceTextureResizePower, NLMISC::clamp, CTextureDrvInfosGL, NL3D::getGlSrcTextureComponentType, NL3D::getGlSrcTextureFormat, getGlTextureFormat, NL3D::getTextureGl, imageSize, min, nglCompressedTexImage2DARB, nglCompressedTexSubImage2DARB, nlassert, NL3D::sameDXTCFormat, and w. |
void NL3D::CDriverGL::verifyNVTextureShaderConfig |
( |
|
) |
[private] |
|
Friends And Related Function Documentation
friend class CTextureDrvInfosGL [friend]
|
|
friend class CVertexArrayRangeATI [friend]
|
|
friend class CVertexArrayRangeNVidia [friend]
|
|
friend class CVertexBufferHardGLATI [friend]
|
|
friend class CVertexBufferHardGLNVidia [friend]
|
|
friend class CVertexProgamDrvInfosGL [friend]
|
|
Member Data Documentation
uint32 NL3D::CDriverGL::_AllocatedTextureMemory [private]
|
|
NLMISC::CRGBA NL3D::CDriverGL::_CurrentBlendConstantColor [private]
|
|
GLfloat NL3D::CDriverGL::_CurrentFogColor[4] [private]
|
|
bool NL3D::CDriverGL::_CurrentGlNormalize [private]
|
|
CMaterial* NL3D::CDriverGL::_CurrentMaterial [private]
|
|
|
Definition at line 590 of file driver_opengl.h.
Referenced by beginCloudMultiPass, beginLightMapMultiPass, beginSpecularMultiPass, CDriverGL, endCloudMultiPass, setupCloudPass, setupLightMapPass, setupMaterial, setupPPLNoSpecPass, setupPPLPass, setupSpecularPass, and swapBuffers. |
|
Definition at line 801 of file driver_opengl.h.
Referenced by activeVertexBuffer, CDriverGL, deleteVertexBufferHard, fenceOnCurVBHardIfNeeded, render, renderPoints, renderQuads, renderSimpleTriangles, renderTriangles, resetVertexArrayRange, and swapBuffers. |
uint8 NL3D::CDriverGL::_Depth [private]
|
|
|
Definition at line 607 of file driver_opengl.h.
Referenced by activateTexture, beginLightMapMultiPass, beginSpecularMultiPass, clearZBuffer, copyFrameBufferToTexture, disableUserTextureMatrix, endSpecularMultiPass, forceActivateTexEnvColor, forceActivateTexEnvMode, initEMBM, resetLightMapVertexSetup, resetTextureShaders, setEMBMMatrix, setMatrix2DForTextureOffsetAddrMode, setTextureEnvFunction, setupCloudPass, setupGlArraysForEXTVertexShader, setupGlArraysForNVVertexProgram, setupGlArraysStd, setupLightMapPass, setupMaterial, setupPPLNoSpecPass, setupPPLPass, setupSpecularPass, setupTextureEx, setupUserTextureMatrix, setupUVPtr, swapBuffers, toggleGlArraysForEXTVertexShader, toggleGlArraysForNVVertexProgram, and uploadTexture. |
GLuint NL3D::CDriverGL::_EVSColorHandle [private]
|
|
GLuint NL3D::CDriverGL::_EVSConstantHandle [private]
|
|
GLuint NL3D::CDriverGL::_EVSNormalHandle [private]
|
|
GLuint NL3D::CDriverGL::_EVSPositionHandle [private]
|
|
GLuint NL3D::CDriverGL::_EVSTexHandle[8] [private]
|
|
|
Definition at line 505 of file driver_opengl.h.
Referenced by activateTexture, activeVertexProgram, beginSpecularMultiPass, checkForPerPixelLightingSupport, computeLightMapInfos, disableHardwareTextureShader, disableHardwareVertexArrayAGP, disableHardwareVertexProgram, enableVertexProgramDoubleSidedColor, forceActivateTexEnvMode, getGlTextureFormat, initEMBM, inlGetNumTextStages, isTextureAddrModeSupported, isVertexProgramEmulated, isVertexProgramSupported, resetTextureShaders, setBlendConstantColor, setConstant, setConstantMatrix, setEMBMMatrix, setupCloudPass, setupFog, setupGlArrays, setupLightMapPass, setupMaterial, setupPPLNoSpecPass, setupPPLPass, setupSpecularPass, setupTextureEx, supportBlendConstantColor, supportEMBM, supportTextureShaders, supportVertexProgramDoubleSidedColor, and uploadTexture. |
bool NL3D::CDriverGL::_FogEnabled [private]
|
|
bool NL3D::CDriverGL::_ForceDXTCCompression [private]
|
|
bool NL3D::CDriverGL::_ForceNormalize [private]
|
|
uint NL3D::CDriverGL::_ForceTextureResizePower [private]
|
|
bool NL3D::CDriverGL::_FullScreen [private]
|
|
bool NL3D::CDriverGL::_Initialized [private]
|
|
bool NL3D::CDriverGL::_LastSetupGLArrayVertexProgram [private]
|
|
bool NL3D::CDriverGL::_LastVertexSetupIsLightMap [private]
|
|
bool NL3D::CDriverGL::_LightEnable[MaxLight] [private]
|
|
std::vector<uint> NL3D::CDriverGL::_LightMapLUT [private]
|
|
uint NL3D::CDriverGL::_LightMode[MaxLight] [private]
|
|
bool NL3D::CDriverGL::_LightSetupDirty [private]
|
|
uint32 NL3D::CDriverGL::_MaterialAllTextureTouchedFlag [private]
|
|
uint NL3D::CDriverGL::_MaxDriverLight [private]
|
|
uint32 NL3D::CDriverGL::_MaxVerticesByVBHard [private]
|
|
CMatrix NL3D::CDriverGL::_ModelViewMatrix [private]
|
|
bool NL3D::CDriverGL::_ModelViewMatrixDirty [private]
|
|
uint32 NL3D::CDriverGL::_NbSetupMaterialCall [private]
|
|
uint32 NL3D::CDriverGL::_NbSetupModelMatrixCall [private]
|
|
uint NL3D::CDriverGL::_NLightMapPass [private]
|
|
uint NL3D::CDriverGL::_NLightMapPerPass [private]
|
|
uint NL3D::CDriverGL::_NLightMaps [private]
|
|
void* NL3D::CDriverGL::_NVCurrentVARPtr [private]
|
|
uint32 NL3D::CDriverGL::_NVCurrentVARSize [private]
|
|
bool NL3D::CDriverGL::_NVTextureShaderEnabled [private]
|
|
bool NL3D::CDriverGL::_OffScreen [private]
|
|
float NL3D::CDriverGL::_OODeltaZ [private]
|
|
float NL3D::CDriverGL::_PPLExponent [private]
|
|
bool NL3D::CDriverGL::_ProjMatDirty [private]
|
|
CVector NL3D::CDriverGL::_PZBCameraPos [private]
|
|
bool NL3D::CDriverGL::_RenderSetupDirty [private]
|
|
bool NL3D::CDriverGL::_SlowUnlockVBHard [private]
|
|
TTexCubeVect NL3D::CDriverGL::_SpecularTextureCubes [private]
|
|
bool NL3D::CDriverGL::_SumTextureMemoryUsed [private]
|
|
bool NL3D::CDriverGL::_SupportPerPixelShader [private]
|
|
bool NL3D::CDriverGL::_SupportPerPixelShaderNoSpec [private]
|
|
bool NL3D::CDriverGL::_SupportVBHard [private]
|
|
CMatrix NL3D::CDriverGL::_TexMtx [private]
|
|
uint NL3D::CDriverGL::_UserTexMatEnabled [private]
|
|
CMatrix NL3D::CDriverGL::_UserViewMtx [private]
|
|
bool NL3D::CDriverGL::_VertexProgramEnabled [private]
|
|
CMatrix NL3D::CDriverGL::_ViewMtx [private]
|
|
CVector NL3D::CDriverGL::_WorldLightDirection[MaxLight] [private]
|
|
CVector NL3D::CDriverGL::_WorldLightPos[MaxLight] [private]
|
|
const uint NL3D::CDriverGL::GLMatrix [static, private]
|
|
const uint NL3D::CDriverGL::GLTransform [static, private]
|
|
const uint NL3D::CDriverGL::GLType [static, private]
|
|
|
Initial value:
{
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_DOUBLE,
GL_FLOAT,
GL_SHORT,
GL_UNSIGNED_BYTE
}
Definition at line 517 of file driver_opengl_vertex.cpp.
Referenced by setupGlArraysForEXTVertexShader, and setupGlArraysForNVVertexProgram. |
const uint NL3D::CDriverGL::GLVertexAttribIndex [static, private]
|
|
|
Initial value:
{
0,
2,
8,
9,
10,
11,
12,
13,
14,
15,
3,
4,
1,
6,
5,
7,
}
Definition at line 536 of file driver_opengl_vertex.cpp.
Referenced by setupGlArraysForEXTVertexShader, setupGlArraysForNVVertexProgram, and toggleGlArraysForNVVertexProgram. |
const uint NL3D::CDriverGL::NumCoordinatesType [static, private]
|
|
|
Initial value:
{
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4
}
Definition at line 498 of file driver_opengl_vertex.cpp.
Referenced by setupGlArraysForEXTVertexShader, and setupGlArraysForNVVertexProgram. |
const uint32 NL3D::CDriverGL::ReleaseVersion = 0x8 [static, private]
|
|
The documentation for this class was generated from the following files:
|
|