NL3D::CDriverGL Class Reference

#include <driver_opengl.h>

Inherits NL3D::IDriver.

List of all members.

Classes

struct  CVBHardProfile

Public Types

enum  { MaxLight = 8 }

Public Member Functions

uint32 getHwnd ()
 CDriverGL ()
virtual ~CDriverGL ()
virtual bool isLost () const
virtual bool init (uint windowIcon=0, emptyProc exitFunc=0)
virtual void disableHardwareVertexProgram ()
 Disable some Feature that may be supported by the Hardware Call before setDisplay() to work properly.
virtual void disableHardwareVertexArrayAGP ()
virtual void disableHardwareTextureShader ()
virtual bool setDisplay (void *wnd, const GfxMode &mode, bool show, bool resizeable) throw (EBadDisplay)
virtual bool setMode (const GfxMode &mode)
virtual bool getModes (std::vector< GfxMode > &modes)
virtual bool getCurrentScreenMode (GfxMode &mode)
 return the current screen mode (if we are in windowed, return the screen mode behind the window)
virtual void beginDialogMode ()
 enter/leave the dialog mode
virtual void endDialogMode ()
virtual void setWindowTitle (const ucstring &title)
 Set the title of the NeL window.
virtual void setWindowPos (uint32 x, uint32 y)
 Set the position of the NeL window.
virtual void showWindow (bool show)
 Show or hide the NeL window.
virtual void * getDisplay ()
virtual uint32 getAvailableVertexAGPMemory ()
 Return the amount of AGP memory allocated by initVertexBufferHard() to store vertices.
virtual uint32 getAvailableVertexVRAMMemory ()
 Return the amount of video memory allocated by initVertexBufferHard() to store vertices.
virtual emptyProc getWindowProc ()
virtual bool activate ()
 Before rendering via a driver in a thread, must activate() (per thread).
virtual uint getNbTextureStages () const
 Get the number of texture stage available, for multi texturing (Normal material shaders). Valid only after setDisplay().
virtual bool isTextureExist (const ITexture &tex)
 is the texture is set up in the driver NB: this method is thread safe.
virtual NLMISC::IEventEmittergetEventEmitter ()
virtual bool clear2D (CRGBA rgba)
virtual bool clearZBuffer (float zval=1)
virtual bool clearStencilBuffer (float stencilval=0)
virtual void setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha)
 Set the color mask filter through where the operation done will pass.
virtual void setDepthRange (float znear, float zfar)
 Set depth range.
virtual void getDepthRange (float &znear, float &zfar) const
virtual bool setupTexture (ITexture &tex)
 setup a texture, generate and upload if needed.
virtual bool setupTextureEx (ITexture &tex, bool bUpload, bool &bAllUploaded, bool bMustRecreateSharedTexture=false)
 setup a texture in the driver.
virtual bool uploadTexture (ITexture &tex, NLMISC::CRect &rect, uint8 nNumMipMap)
 The texture must be created or uploadTexture do nothing.
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.
virtual void forceTextureResize (uint divisor)
 if !=1, force mostly all the textures (but TextureFonts lightmaps, interfaces etc.
virtual void forceNativeFragmentPrograms (bool nativeOnly)
 Sets enforcement of native fragment programs.
void setTextureEnvFunction (uint stage, CMaterial &mat)
 Setup texture env functions. Used by setupMaterial.
void setupUserTextureMatrix (uint numStages, CMaterial &mat)
 setup the texture matrix for a given number of stages (starting from 0)
void disableUserTextureMatrix ()
 disable all texture matrix
virtual bool setupMaterial (CMaterial &mat)
 For objects with caustics, setup the first texture (which actually is the one from the material).
virtual void startSpecularBatch ()
 Special for Faster Specular Setup.
virtual void endSpecularBatch ()
virtual void setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective=true)
virtual void setFrustumMatrix (CMatrix &frust)
virtual CMatrix getFrustumMatrix ()
virtual float getClipSpaceZMin () const
virtual void setupViewMatrix (const CMatrix &mtx)
 setup the view matrix (inverse of camera matrix).
virtual void setupViewMatrixEx (const CMatrix &mtx, const CVector &cameraPos)
 setup the view matrix (inverse of camera matrix).
virtual void setupModelMatrix (const CMatrix &mtx)
 setup the model matrix.
virtual CMatrix getViewMatrix () const
virtual bool activeShader (CShader *shd)
 Activate a shader, NULL to disable the current shader.
virtual void forceNormalize (bool normalize)
 Force input normal to be normalized by the driver.
virtual bool isForceNormalize () const
 return the forceNormalize() state.
virtual void getNumPerStageConstant (uint &lightedMaterial, uint &unlightedMaterial) const
 Get max number of per stage constant that can be used simultaneously.
virtual bool supportVertexBufferHard () const
 return true if driver support VertexBufferHard.
virtual bool supportVolatileVertexBuffer () const
 return true if volatile vertex buffer are supported.
virtual bool supportCloudRenderSinglePass () const
virtual bool supportIndexOffset () const
 return true if driver support indices offset.
virtual bool slowUnlockVertexBufferHard () const
 return true if driver support VertexBufferHard, but vbHard->unlock() are slow (ATI-openGL).
virtual uint getMaxVerticesByVertexBufferHard () const
 return How many vertices VertexBufferHard support
virtual bool initVertexBufferHard (uint agpMem, uint vramMem)
 Allocate the initial VertexArray Memory.
virtual bool activeVertexBuffer (CVertexBuffer &VB)
 active a current VB, for future render().
virtual bool activeIndexBuffer (CIndexBuffer &IB)
 active a current IB, for future render().
virtual void mapTextureStageToUV (uint stage, uint uv)
 Say what Texture Stage use what UV coord.
virtual bool renderLines (CMaterial &mat, uint32 firstIndex, uint32 nlines)
 Render a list of indexed lines with previously setuped VertexBuffer / IndexBuffer / Matrixes.
virtual bool renderTriangles (CMaterial &Mat, uint32 firstIndex, uint32 ntris)
 Render a list of indexed triangles with previously setuped VertexBuffer / IndexBuffer / Matrixes.
virtual bool renderSimpleTriangles (uint32 firstTri, uint32 ntris)
 Render a list of triangles with previously setuped VertexBuffer / IndexBuffer / Matrixes, AND previously setuped MATERIAL!! This use the last material setuped.
virtual bool renderRawPoints (CMaterial &Mat, uint32 startIndex, uint32 numPoints)
 Render points with previously setuped VertexBuffer / Matrixes.
virtual bool renderRawLines (CMaterial &Mat, uint32 startIndex, uint32 numLines)
 Render lines with previously setuped VertexBuffer / Matrixes.
virtual bool renderRawTriangles (CMaterial &Mat, uint32 startIndex, uint32 numTris)
 Render triangles with previously setuped VertexBuffer / Matrixes.
virtual bool renderRawQuads (CMaterial &Mat, uint32 startIndex, uint32 numQuads)
 render quads with previously setuped VertexBuffer / Matrixes.
virtual bool renderLinesWithIndexOffset (CMaterial &, uint32, uint32, uint)
 If the driver support it, primitive can be rendered with an offset added to each index These are the offseted version of the 'render' functions.
virtual bool renderTrianglesWithIndexOffset (CMaterial &, uint32, uint32, uint)
virtual bool renderSimpleTrianglesWithIndexOffset (uint32, uint32, uint)
virtual bool swapBuffers ()
 Swap the back and front buffers.
virtual void setSwapVBLInterval (uint interval)
 set the number of VBL wait when a swapBuffers() is issued.
virtual uint getSwapVBLInterval ()
 get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL
virtual void profileRenderedPrimitives (CPrimitiveProfile &pIn, CPrimitiveProfile &pOut)
 Get the number of primitives rendered from the last swapBuffers() call.
virtual uint32 profileAllocatedTextureMemory ()
 Return the amount of Texture memory requested.
virtual uint32 profileSetupedMaterials () const
 Get the number of material setuped from the last swapBuffers() call.
virtual uint32 profileSetupedModelMatrix () const
 Get the number of matrix setuped from the last swapBuffers() call.
void enableUsedTextureMemorySum (bool enable)
 Enable the sum of texture memory used since last swapBuffers() call.
uint32 getUsedTextureMemory () const
 Return the amount of texture video memory used since last swapBuffers() call.
virtual void startProfileVBHardLock ()
 If the driver support it, enable profile VBHard locks.
virtual void endProfileVBHardLock (std::vector< std::string > &result)
 If the driver support it, stop profile VBHard locks, and "print" result No-Op if already profiling NB: The results are the Locks in Chronological time (since last swapBuffers).
virtual void profileVBHardAllocation (std::vector< std::string > &result)
 display VBhards allocated
virtual void startProfileIBLock ()
virtual void endProfileIBLock (std::vector< std::string > &result)
virtual void profileIBAllocation (std::vector< std::string > &result)
virtual bool release ()
 Deriver should calls IDriver::release() first, to destroy all driver components (textures, shaders, VBuffers).
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.
virtual void setupScissor (const class CScissor &scissor)
 Set the current Scissor.
virtual void setupViewport (const class CViewport &viewport)
 Set the current viewport.
virtual void getViewport (CViewport &viewport)
 Get the current viewport.
virtual uint32 getImplementationVersion () const
 Get the driver version.
virtual const char * getDriverInformation ()
 Get driver informations.
virtual const char * getVideocardInformation ()
 Get videocard informations.
virtual bool isActive ()
 Return true if driver is still active. Return false else. If he user close the window, must return false.
virtual uint8 getBitPerPixel ()
 Return the depth of the driver after init().
virtual void showCursor (bool b)
 show cursor if b is true, or hide it if b is false
virtual void setMousePos (float x, float y)
 x and y must be between 0.0 and 1.0
virtual void setCapture (bool b)
 If true, capture the mouse to force it to stay under the window.
virtual NLMISC::IMouseDeviceenableLowLevelMouse (bool enable, bool exclusive)
 Enable / disable low level mouse.
virtual NLMISC::IKeyboardDeviceenableLowLevelKeyboard (bool enable)
 Enable / disable a low level keyboard.
virtual
NLMISC::IInputDeviceManager
getLowLevelInputDeviceManager ()
 Check whether there is a low level device manager available, and get its interface.
virtual uint getDoubleClickDelay (bool hardwareMouse)
 Get the delay in ms for mouse double clicks.
virtual void getWindowSize (uint32 &width, uint32 &height)
 Get the width and the height of the window.
virtual void getWindowPos (uint32 &x, uint32 &y)
 Get the position of the window always (0,0) in fullscreen.
virtual void getBuffer (CBitmap &bitmap)
 get the RGBA back buffer.
virtual void getZBuffer (std::vector< float > &zbuffer)
 get the ZBuffer (back buffer).
virtual void getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect)
 get a part of the RGBA back buffer.
virtual bool stretchRect (ITexture *srcText, NLMISC::CRect &srcRect, ITexture *destText, NLMISC::CRect &destRect)
virtual bool supportBloomEffect () const
virtual bool activeFrameBufferObject (ITexture *tex)
virtual void getZBufferPart (std::vector< float > &zbuffer, NLMISC::CRect &rect)
 get a part of the ZBuffer (back buffer).
virtual bool setRenderTarget (ITexture *tex, uint32 x, uint32 y, uint32 width, uint32 height, uint32 mipmapLevel, uint32 cubeFace)
 Set the current render target.
virtual bool copyTargetToTexture (ITexture *tex, uint32 offsetx, uint32 offsety, uint32 x, uint32 y, uint32 width, uint32 height, uint32 mipmapLevel)
 Trick method : copy the current texture target into another texture without updating the current texture.
virtual bool getRenderTargetSize (uint32 &width, uint32 &height)
 Retrieve the render target size.
virtual bool fillBuffer (CBitmap &bitmap)
 fill the RGBA back buffer
virtual void setPolygonMode (TPolygonMode mode)
 Set the global polygon mode.
virtual uint getMaxLight () const
 return the number of light supported by driver.
virtual void setLight (uint8 num, const CLight &light)
 Setup a light.
virtual void enableLight (uint8 num, bool enable=true)
 Enable / disable light.
virtual void setPerPixelLightingLight (CRGBA diffuse, CRGBA specular, float shininess)
 Setup the light used for per pixel lighting.
virtual void setLightMapDynamicLight (bool enable, const CLight &light)
 Setup the unique light used for Lightmap Shader.
virtual void setAmbientColor (CRGBA color)
 Set ambient.
virtual bool supportPerPixelLighting (bool specular) const
virtual void swapTextureHandle (ITexture &tex0, ITexture &tex1)
 Special method to internally swap the Driver handle of 2 textures.
virtual uint getTextureHandle (const ITexture &tex)
 Advanced usage.
virtual uint getNumAdapter () const
 Adaptor information.
virtual bool getAdapter (uint adapter, CAdapter &desc) const
virtual bool setAdapter (uint adapter)
 Choose the hardware renderer.
virtual
CVertexBuffer::TVertexColorType 
getVertexColorFormat () const
 Tell if the vertex color memory format is RGBA (openGL) or BGRA (directx) BGRA : ***************************************************************** Offset: * 0 * 1 * 2 * 3 * ***************************************************************** RGBA * red * green * blue * alpha * ***************************************************************** BGRA * blue * green * red * alpha *
virtual void startBench (bool wantStandardDeviation=false, bool quick=false, bool reset=true)
virtual void endBench ()
virtual void displayBench (class NLMISC::CLog *log)
virtual bool supportOcclusionQuery () const
virtual IOcclusionQuerycreateOcclusionQuery ()
 Create an occlusion query object.
virtual void deleteOcclusionQuery (IOcclusionQuery *oq)
virtual bool supportTextureRectangle () const
virtual bool supportFrameBufferObject () const
virtual bool supportPackedDepthStencil () const
virtual uint64 getSwapBufferCounter () const
virtual void setCullMode (TCullMode cullMode)
 Set cull mode Useful for mirrors / cube map rendering or when the scene must be rendered upside down.
virtual TCullMode getCullMode () const
virtual void enableStencilTest (bool enable)
 Set stencil support.
virtual bool isStencilTestEnabled () const
virtual void stencilFunc (TStencilFunc stencilFunc, int ref, uint mask)
virtual void stencilOp (TStencilOp fail, TStencilOp zfail, TStencilOp zpass)
virtual void stencilMask (uint mask)
void incrementResetCounter ()
bool isWndActive () const
const IVertexBufferHardGLgetCurrentVertexBufferHard () const
void checkTextureOn () const
Fog support.



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.
virtual float getFogStart () const
 Get.
virtual float getFogEnd () const
virtual CRGBA getFogColor () const
texture addressing modes



virtual bool supportTextureShaders () const
 test whether the device supports some form of texture shader. (could be limited to DX6 EMBM for example)
virtual bool isWaterShaderSupported () const
virtual bool isTextureAddrModeSupported (CMaterial::TTexAddressingMode mode) const
 test whether a texture addressing mode is supported
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]
EMBM support



virtual bool supportEMBM () const
virtual bool isEMBMSupportedAtStage (uint stage) const
virtual void setEMBMMatrix (const uint stage, const float mat[4])
Misc



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.
virtual void setBlendConstantColor (NLMISC::CRGBA col)
 see supportBlendConstantColor().
virtual NLMISC::CRGBA getBlendConstantColor () const
 see supportBlendConstantColor().
virtual bool setMonitorColorProperties (const CMonitorColorProperties &properties)
 Setup monitor color properties.
virtual void finish ()
 force the driver to flush all command.
virtual void flush ()
virtual void enablePolygonSmoothing (bool smooth)
 Use AntiAliasing For polygons (GL_POLYGON_SMOOTH like, not the FSAA).
virtual bool isPolygonSmoothingEnabled () const
 see enablePolygonSmoothing()

Public Attributes

TOcclusionQueryList _OcclusionQueryList
COcclusionQueryGL_CurrentOcclusionQuery

Static Public Attributes

static GLenum NLCubeFaceToGLCubeFace [6]
static CMaterial::CTexEnv _TexEnvReplace

Protected Attributes

bool _WndActive
uint64 _SwapBufferCounter

Private Member Functions

virtual class IVertexBufferHardGLcreateVertexBufferHard (uint size, uint numVertices, CVertexBuffer::TPreferredMemory vbType, CVertexBuffer *vb)
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!
void verifyNVTextureShaderConfig ()
void cleanLightSetup ()
GLint getGlTextureFormat (ITexture &tex, bool &compressed)
bool clipRect (NLMISC::CRect &rect)
void copyFrameBufferToTexture (ITexture *tex, uint32 level, uint32 offsetx, uint32 offsety, uint32 x, uint32 y, uint32 width, uint32 height, uint cubeFace=0)
virtual bool isTextureRectangle (ITexture *tex) const
void setupUVPtr (uint stage, CVertexBufferInfo &VB, uint uvId)
 setup a texture stage with an UV from VB.
void setupGlArrays (CVertexBufferInfo &vb)
 setup GL arrays, with a vb info.
void setupGlArraysStd (CVertexBufferInfo &vb)
 Tools fct used by setupGLArrays.
void setupGlArraysForNVVertexProgram (CVertexBufferInfo &vb)
void setupGlArraysForARBVertexProgram (CVertexBufferInfo &vb)
void setupGlArraysForEXTVertexShader (CVertexBufferInfo &vb)
void toggleGlArraysForNVVertexProgram ()
void toggleGlArraysForARBVertexProgram ()
void toggleGlArraysForEXTVertexShader ()
void enableGlNormalize (bool normalize)
 Test/activate normalisation of normal.
void refreshRenderSetup ()
void doRefreshRenderSetup ()
void setLightInternal (uint8 num, const CLight &light)
void enableLightInternal (uint8 num, bool enable)
void setupLightMapDynamicLighting (bool enable)
bool isVertexProgramEnabled () const
uint inlGetNumTextStages () const
 Same as getNbTextureStages(), but faster because inline, and not virtual!!
void initEMBM ()
void retrieveATIDriverVersion ()
void bindTextureWithMode (ITexture &tex)
 Bind a texture at stage 0 for the good texture mode(2d or cube) Parameters / part of the texture are ready to be changed in the gl after that _CurrentTexture & _CurrentTextureInfoGL are not modified !
void setupTextureBasicParameters (ITexture &tex)
 Force to set clamp & wrap mode for the given texture Setup is done for texture currently bind to the gl, so calling bindTextureWithMode is necessary.
Water



sint beginWaterMultiPass ()
void setupWaterPass (uint pass)
void endWaterMultiPass ()
Cloud Shader



sint beginCloudMultiPass ()
void setupCloudPass (uint pass)
void endCloudMultiPass ()
Vertex program interface



bool isVertexProgramSupported () const
 Does the driver supports vertex programs ?
bool isVertexProgramEmulated () const
 Does the driver supports vertex program, but emulated by CPU ?
bool activeVertexProgram (CVertexProgram *program)
 Activate / disactivate a vertex program.
void setConstant (uint index, float, float, float, float)
 Setup constant values.
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
void setConstant (uint index, uint num, const double *src)
 setup several 4 double csts taken from the given tab
void setConstantMatrix (uint index, IDriver::TMatrix matrix, IDriver::TTransform transform)
 Setup constants with a current matrix.
void setConstantFog (uint index)
 Setup the constant with the fog vector.
void enableVertexProgramDoubleSidedColor (bool doubleSided)
 Activate VertexProgram 2Sided Color mode.
bool supportVertexProgramDoubleSidedColor () const
 Check if the driver support double sided colors vertex programs.
virtual bool supportMADOperator () const
Vertex program implementation



bool activeNVVertexProgram (CVertexProgram *program)
bool activeARBVertexProgram (CVertexProgram *program)
bool activeEXTVertexShader (CVertexProgram *program)

Private Attributes

bool _FullScreen
bool _OffScreen
uint _Interval
sint32 _WindowWidth
sint32 _WindowHeight
sint32 _WindowX
sint32 _WindowY
Display * dpy
GLXContext ctx
Window win
Cursor cursor
NLMISC::CUnixEventEmitter _EventEmitter
bool _Initialized
uint8 _Depth
bool _ForceNormalize
bool _LightSetupDirty
bool _ModelViewMatrixDirty
bool _ProjMatDirty
NLMISC::CMatrix _GLProjMat
bool _RenderSetupDirty
float _OODeltaZ
CMatrix _UserViewMtx
CMatrix _ViewMtx
CMatrix _SpecularTexMtx
CVector _PZBCameraPos
CMatrix _ModelViewMatrix
bool _FogEnabled
float _FogEnd
float _FogStart
GLfloat _CurrentFogColor [4]
CViewport _CurrViewport
CScissor _CurrScissor
CViewport _OldViewport
bool _RenderTargetFBO
uint _MaxDriverLight
uint _LightMode [MaxLight]
CVector _WorldLightPos [MaxLight]
CVector _WorldLightDirection [MaxLight]
bool _LightDirty [MaxLight]
CLight _LightMapDynamicLight
bool _LightMapDynamicLightEnabled
bool _LightMapDynamicLightDirty
CLight _UserLight0
bool _UserLightEnable [MaxLight]
bool _CurrentGlNormalize
CVertexBufferInfo _LastVB
 LastVB for UV setup.
CIndexBufferInfo _LastIB
bool _VertexProgramEnabled
bool _LastSetupGLArrayVertexProgram
NLMISC::CRefPtr< CVertexProgram_LastSetuppedVP
bool _ForceDXTCCompression
uint _ForceTextureResizePower
 Divisor for textureResize (power).
bool _ForceNativeFragmentPrograms
NLMISC::CMatrix _UserTexMat [IDRV_MAT_MAXTEXTURES]
uint _UserTexMatEnabled
NLMISC::CRGBA _CurrentBlendConstantColor
bool _PolygonSmooth
uint _ATIDriverVersion
bool _ATIFogRangeFixed

Static Private Attributes

static const uint32 ReleaseVersion = 0xe
static const uint NumCoordinatesType [CVertexBuffer::NumType]
static const uint GLType [CVertexBuffer::NumType]
static const uint GLVertexAttribIndex [CVertexBuffer::NumValue]
static const bool GLTypeIsIntegral [CVertexBuffer::NumType]
static const uint GLMatrix [IDriver::NumMatrix]
static const uint GLTransform [IDriver::NumTransform]

Friends

class CTextureDrvInfosGL
class CVertexProgamDrvInfosGL

EXTVertexShader specifics.



enum  EEVSVariants {
  EVSSecondaryColorVariant = 0, EVSFogCoordsVariant = 1, EVSSkinWeightVariant = 2, EVSPaletteSkinVariant = 3,
  EVSNumVariants
}
static const uint _EVSNumConstant = 97
GLuint _EVSPositionHandle
GLuint _EVSNormalHandle
GLuint _EVSColorHandle
GLuint _EVSTexHandle [8]
GLuint _EVSConstantHandle
bool setupEXTVertexShader (const CVPParser::TProgram &program, GLuint id, uint variants[EVSNumVariants], uint16 &usedInputRegisters)
 Setup a vertex shader from its parsed program.
bool setupARBVertexProgram (const CVPParser::TProgram &parsedProgram, GLuint id, bool &specularWritten)

Prec settings, for optimisation.



enum  CTexEnvSpecial {
  TexEnvSpecialDisabled = 0, TexEnvSpecialLightMap, TexEnvSpecialSpecularStage1, TexEnvSpecialSpecularStage1NoText,
  TexEnvSpecialPPLStage0, TexEnvSpecialPPLStage2, TexEnvSpecialCloudStage0, TexEnvSpecialCloudStage1
}
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
void resetTextureShaders ()
void setTextureShaders (const uint8 *addressingModes, const NLMISC::CSmartPtr< ITexture > *textures)
 set texture shaders from stage 0 to stage IDRV_MAT_MAXTEXTURES - 1 textures are needed to setup the right kind of shader (cubic or 2d texture)

Per pixel lighting



typedef NLMISC::CSmartPtr
< CTextureCube
TSPTextureCube
typedef std::vector
< TSPTextureCube
TTexCubeVect
TTexCubeVect _SpecularTextureCubes
sint beginPPLMultiPass ()
void setupPPLPass (uint pass)
void endPPLMultiPass ()
sint beginPPLNoSpecMultiPass ()
void setupPPLNoSpecPass (uint pass)
void endPPLNoSpecMultiPass ()
CTextureCubegetSpecularCubeMap (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
CTextureCubegetDiffuseCubeMap ()

VertexBufferHard



class CVertexArrayRangeNVidia
class CVertexBufferHardGLNVidia
class CVertexArrayRangeATI
class CVertexArrayRangeARB
class CVertexBufferHardARB
class CVertexBufferHardGLATI
class CVertexArrayRangeMapObjectATI
class CVertexBufferHardGLMapObjectATI
class CVBDrvInfosGL
CPtrSet< IVertexBufferHardGL_VertexBufferHardSet
IVertexArrayRange_CurrentVertexArrayRange
IVertexBufferHardGL_CurrentVertexBufferHard
void * _NVCurrentVARPtr
uint32 _NVCurrentVARSize
bool _SupportVBHard
bool _SlowUnlockVBHard
uint32 _MaxVerticesByVBHard
IVertexArrayRange_AGPVertexArrayRange
IVertexArrayRange_VRAMVertexArrayRange
void resetVertexArrayRange ()
void fenceOnCurVBHardIfNeeded (IVertexBufferHardGL *newVBHard)

Driver Caps.



CGlExtensions _Extensions
bool _SupportPerPixelShader
bool _SupportPerPixelShaderNoSpec
float _PPLExponent
NLMISC::CRGBA _PPLightDiffuseColor
NLMISC::CRGBA _PPLightSpecularColor
void checkForPerPixelLightingSupport ()

Lightmap.



uint _NLightMaps
 Temp Variables computed in beginLightMapMultiPass(). Reused in setupLightMapPass().
uint _NLightMapPerPass
uint _NLightMapPass
bool _LightMapNoMulAddFallBack
std::vector< uint_LightMapLUT
CMaterial::CTexEnv _LightMapLastStageEnv
bool _LastVertexSetupIsLightMap
sint8 _LightMapUVMap [IDRV_MAT_MAXTEXTURES]
void computeLightMapInfos (const CMaterial &mat)
sint beginLightMapMultiPass ()
void setupLightMapPass (uint pass)
void endLightMapMultiPass ()
void resetLightMapVertexSetup ()

Specular.



bool _SpecularBatchOn
sint beginSpecularMultiPass ()
void setupSpecularPass (uint pass)
void endSpecularMultiPass ()
void setupSpecularBegin ()
void setupSpecularEnd ()

Profiling



CPrimitiveProfile _PrimitiveProfileIn
CPrimitiveProfile _PrimitiveProfileOut
uint32 _AllocatedTextureMemory
uint32 _NbSetupMaterialCall
uint32 _NbSetupModelMatrixCall
bool _SumTextureMemoryUsed
std::set< CTextureDrvInfosGL * > _TextureUsed
bool _VBHardProfiling
std::vector< CVBHardProfile_VBHardProfiles
uint _CurVBHardLockCount
uint _NumVBHardProfileFrame
uint computeMipMapMemoryUsage (uint w, uint h, GLint glfmt) const
void appendVBHardLockProfile (NLMISC::TTicks time, CVertexBuffer *vb)

Caustics shaders



NLMISC::CSmartPtr< CTextureCube_CausticCubeMap
static void initCausticCubeMap ()



GLuint ATIWaterShaderHandleNoDiffuseMap
 shaders
GLuint ATIWaterShaderHandle
GLuint ATICloudShaderHandle
GLuint ARBWaterShader [4]
CSmartPtr< ITexture_TextureTarget
 to texture
uint32 _TextureTargetLevel
uint32 _TextureTargetX
uint32 _TextureTargetY
uint32 _TextureTargetWidth
uint32 _TextureTargetHeight
bool _TextureTargetUpload
uint _TextureTargetCubeFace
CMaterial::TShader getSupportedShader (CMaterial::TShader shader)
 for material shaders
void initFragmentShaders ()
void deleteFragmentShaders ()
void deleteARBFragmentPrograms ()
void setupWaterPassR200 (const CMaterial &mat)
 water setup for ATI
void setupWaterPassARB (const CMaterial &mat)
 water setup for ARB_fragment_program
void setupWaterPassNV20 (const CMaterial &mat)

Material multipass.



virtual sint beginMaterialMultiPass ()
 NB: setupMaterial() must be called before thoses methods.
virtual void setupMaterialPass (uint pass)
 active the ith pass of this material.
virtual void endMaterialMultiPass ()
 end multipass for this material.
sint beginMultiPass ()
 NB: setupMaterial() must be called before thoses methods.
void setupPass (uint pass)
 active the ith pass of this material.
void endMultiPass ()
 end multipass for this material.

Detailed Description

Definition at line 275 of file driver_opengl.h.


Member Typedef Documentation

Definition at line 987 of file driver_opengl.h.

typedef std::vector<TSPTextureCube> NL3D::CDriverGL::TTexCubeVect [private]

Definition at line 988 of file driver_opengl.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MaxLight 

Definition at line 280 of file driver_opengl.h.

Enumerator:
TexEnvSpecialDisabled 
TexEnvSpecialLightMap 
TexEnvSpecialSpecularStage1 
TexEnvSpecialSpecularStage1NoText 
TexEnvSpecialPPLStage0 
TexEnvSpecialPPLStage2 
TexEnvSpecialCloudStage0 
TexEnvSpecialCloudStage1 

Definition at line 803 of file driver_opengl.h.

Enumerator:
EVSSecondaryColorVariant 
EVSFogCoordsVariant 
EVSSkinWeightVariant 
EVSPaletteSkinVariant 
EVSNumVariants 

Definition at line 1222 of file driver_opengl.h.


Constructor & Destructor Documentation

NL3D::CDriverGL::CDriverGL (  ) 

buildCausticCubeMapTex();

Definition at line 268 of file driver_opengl.cpp.

References _AGPVertexArrayRange, _AllocatedTextureMemory, _ATIDriverVersion, _ATIFogRangeFixed, _CurrentFogColor, _CurrentGlNormalize, _CurrentMaterial, _CurrentMaterialSupportedShader, _CurrentOcclusionQuery, _CurrentTexAddrMode, _CurrentVertexArrayRange, _CurrentVertexBufferHard, _CurVBHardLockCount, _FogEnabled, _FogEnd, _FogStart, _ForceDXTCCompression, _ForceNativeFragmentPrograms, _ForceNormalize, _ForceTextureResizePower, _FullScreen, _Initialized, _Interval, _LastVertexSetupIsLightMap, _LightDirty, _LightMapDynamicLightDirty, _LightMapDynamicLightEnabled, _LightMapLastStageEnv, _LightMapLUT, _LightMapUVMap, _LightSetupDirty, _MaterialAllTextureTouchedFlag, _MaxVerticesByVBHard, _ModelViewMatrixDirty, _NumVBHardProfileFrame, _NVCurrentVARPtr, _NVCurrentVARSize, _NVTextureShaderEnabled, _OffScreen, _PolygonSmooth, _ProjMatDirty, _RenderSetupDirty, _RenderTargetFBO, _SlowUnlockVBHard, _SpecularBatchOn, _StageSupportEMBM, _SumTextureMemoryUsed, _SupportVBHard, _SwapBufferCounter, _TexEnvReplace, _TextureTargetCubeFace, _TextureTargetUpload, _UserLight0, _UserTexMatEnabled, _VBHardProfiling, _VRAMVertexArrayRange, _WndActive, ARBWaterShader, ATICloudShaderHandle, ATIWaterShaderHandle, ATIWaterShaderHandleNoDiffuseMap, NLMISC::CRGBA::Black, cursor, NL3D::CMaterial::CTexEnv::Env, H_AUTO_OGL, NL3D::IDRV_MAT_MAXTEXTURES, NL3D::IDRV_TOUCHED_TEX, NLMISC::CVector::K, MaxLight, NL3D_DRV_MAX_LIGHTMAP, NL3D::CMaterial::Normal, NL3D::CMaterial::Previous, NL3D::CMaterial::Replace, NL3D::CMaterial::CTexEnv::setDefault(), NL3D::CLight::setupDirectional(), NL3D::CMaterial::SrcAlpha, NL3D::CMaterial::Texture, and NLMISC::CRGBA::White.

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

Definition at line 408 of file driver_opengl.cpp.

References H_AUTO_OGL, and release().


Member Function Documentation

bool NL3D::CDriverGL::activate (  )  [virtual]

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

Implements NL3D::IDriver.

Definition at line 1772 of file driver_opengl.cpp.

References ctx, dpy, H_AUTO_OGL, and win.

void NL3D::CDriverGL::activateTexEnvColor ( uint  stage,
NLMISC::CRGBA  col 
) [private]
void NL3D::CDriverGL::activateTexEnvColor ( uint  stage,
const CMaterial::CTexEnv env 
) [private]
void NL3D::CDriverGL::activateTexEnvMode ( uint  stage,
const CMaterial::CTexEnv env 
) [private]
bool NL3D::CDriverGL::activateTexture ( uint  stage,
ITexture tex 
) [private]
bool NL3D::CDriverGL::activeARBVertexProgram ( CVertexProgram program  )  [private]
bool NL3D::CDriverGL::activeEXTVertexShader ( CVertexProgram program  )  [private]
bool NL3D::CDriverGL::activeFrameBufferObject ( ITexture tex  )  [virtual]
bool NL3D::CDriverGL::activeIndexBuffer ( CIndexBuffer IB  )  [virtual]

active a current IB, for future render().

Don't change the index buffer format/size after having activated it. Don't lock the index buffer after having activated it.

Implements NL3D::IDriver.

Definition at line 252 of file driver_opengl_vertex.cpp.

References _LastIB, H_AUTO_OGL, and NL3D::CIndexBufferInfo::setupIndexBuffer().

bool NL3D::CDriverGL::activeNVVertexProgram ( CVertexProgram program  )  [private]
bool NL3D::CDriverGL::activeShader ( CShader shd  )  [virtual]

Activate a shader, NULL to disable the current shader.

Implements NL3D::IDriver.

Definition at line 4024 of file driver_opengl.cpp.

References H_AUTO_OGL.

bool NL3D::CDriverGL::activeVertexBuffer ( CVertexBuffer VB  )  [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. Don't change the vertex buffer format/size after having activated it. Don't lock the vertex buffer after having activated it.

See also:
activeVertexProgram

Implements NL3D::IDriver.

Definition at line 188 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, _DriverGLStates, _LastVB, _LastVertexSetupIsLightMap, NL3D::CVBDrvInfosGL::_VBHard, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::IVertexBufferHardGL::disable(), NL3D::CVertexBuffer::DrvInfos, NL3D::IVertexBufferHardGL::enable(), fenceOnCurVBHardIfNeeded(), NL3D::CVertexBuffer::fillBuffer(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getVertexFormat(), H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, NL3D::IVertexBufferHardGL::isInvalid(), NLMISC::safe_cast(), setupGlArrays(), NL3D::CVertexBufferInfo::setupVertexBuffer(), setupVertexBuffer(), and NL3D::CVertexBufferInfo::VBMode.

Referenced by swapBuffers().

bool NL3D::CDriverGL::activeVertexProgram ( CVertexProgram program  )  [private, 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 succeeded, false else.

Implements NL3D::IDriver.

Definition at line 1592 of file driver_opengl_vertex_program.cpp.

References _Extensions, activeARBVertexProgram(), activeEXTVertexShader(), activeNVVertexProgram(), NL3D::CGlExtensions::ARBVertexProgram, NL3D::CGlExtensions::EXTVertexShader, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgram.

Referenced by swapBuffers().

void NL3D::CDriverGL::appendVBHardLockProfile ( NLMISC::TTicks  time,
CVertexBuffer vb 
) [private]
sint NL3D::CDriverGL::beginCloudMultiPass (  )  [private]
void NL3D::CDriverGL::beginDialogMode (  )  [virtual]

enter/leave the dialog mode

Implements NL3D::IDriver.

Definition at line 4358 of file driver_opengl.cpp.

sint NL3D::CDriverGL::beginLightMapMultiPass (  )  [private]
virtual sint NL3D::CDriverGL::beginMaterialMultiPass (  )  [inline, virtual]

NB: setupMaterial() must be called before thoses methods.

NB: This is intended to be use with the rendering of simple primitives. NB: Other render calls performs the needed setup automatically init multipass for _CurrentMaterial. return number of pass required to render this material.

Implements NL3D::IDriver.

Definition at line 617 of file driver_opengl.h.

References beginMultiPass().

sint NL3D::CDriverGL::beginMultiPass (  )  [private]
sint NL3D::CDriverGL::beginPPLMultiPass (  )  [private]

Definition at line 1538 of file driver_opengl_material.cpp.

References H_AUTO_OGL, nlassert, and supportPerPixelLighting().

Referenced by beginMultiPass().

sint NL3D::CDriverGL::beginPPLNoSpecMultiPass (  )  [private]

Definition at line 1734 of file driver_opengl_material.cpp.

References H_AUTO_OGL, nlassert, and supportPerPixelLighting().

Referenced by beginMultiPass().

sint NL3D::CDriverGL::beginSpecularMultiPass (  )  [private]
sint NL3D::CDriverGL::beginWaterMultiPass (  )  [private]
void NL3D::CDriverGL::bindTextureWithMode ( ITexture tex  )  [inline, private]

Bind a texture at stage 0 for the good texture mode(2d or cube) Parameters / part of the texture are ready to be changed in the gl after that _CurrentTexture & _CurrentTextureInfoGL are not modified !

Definition at line 531 of file driver_opengl_texture.cpp.

References _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), NL3D::getTextureGl(), GL_TEXTURE_RECTANGLE_NV, NL3D::CTextureDrvInfosGL::ID, NL3D::ITexture::isTextureCube(), NL3D::CDriverGLStates::setTextureMode(), NL3D::CDriverGLStates::Texture2D, NL3D::CDriverGLStates::TextureCubeMap, NL3D::CTextureDrvInfosGL::TextureMode, and NL3D::CDriverGLStates::TextureRect.

Referenced by setupTextureEx().

void NL3D::CDriverGL::checkForPerPixelLightingSupport (  )  [private]
void NL3D::CDriverGL::checkTextureOn (  )  const
void NL3D::CDriverGL::cleanLightSetup (  )  [private]
bool NL3D::CDriverGL::clear2D ( CRGBA  rgba  )  [virtual]
bool NL3D::CDriverGL::clearStencilBuffer ( float  stencilval = 0  )  [virtual]

Implements NL3D::IDriver.

Definition at line 1847 of file driver_opengl.cpp.

References H_AUTO_OGL.

bool NL3D::CDriverGL::clearZBuffer ( float  zval = 1  )  [virtual]

Implements NL3D::IDriver.

Definition at line 1831 of file driver_opengl.cpp.

References _DriverGLStates, NL3D::CDriverGLStates::enableZWrite(), and H_AUTO_OGL.

bool NL3D::CDriverGL::clipRect ( NLMISC::CRect rect  )  [private]
void NL3D::CDriverGL::computeLightMapInfos ( const CMaterial mat  )  [private]
uint NL3D::CDriverGL::computeMipMapMemoryUsage ( uint  w,
uint  h,
GLint  glfmt 
) const [private]

???

Definition at line 373 of file driver_opengl_texture.cpp.

References GL_DSDT_NV, GL_DU8DV8_ATI, H_AUTO_OGL, and nlstop.

Referenced by setupTextureEx().

void NL3D::CDriverGL::copyFrameBufferToTexture ( ITexture tex,
uint32  level,
uint32  offsetx,
uint32  offsety,
uint32  x,
uint32  y,
uint32  width,
uint32  height,
uint  cubeFace = 0 
) [private]
bool NL3D::CDriverGL::copyTargetToTexture ( ITexture tex,
uint32  offsetx,
uint32  offsety,
uint32  x,
uint32  y,
uint32  width,
uint32  height,
uint32  mipmapLevel 
) [virtual]

Trick method : copy the current texture target into another texture without updating the current texture.

This method copies the current texture into another texture. WARNING : at the next setRenderTarget () call, the current texture target WILL NOT BE UPDATED.

When direct render to texture is not available, this method can save a texture copy :

Use this method to copy a temporary texture target into a destination texture. Then, resets the rendering target with setRenderTarget().

The temporary texture is copied into the final texture direct from the frame buffer. The temporary texture is not filled in VRAM when the framebuffer is set back as render target.

Works only if a texture is used as render target.

This method invalidates the vertex buffer, the view and model matrices, the viewport and the frustum.

Parameters:
tex the texture to render into.
offsetx x position within the destination texture.
y y position within the destination texture.
x x position within the current texture target.
y y position within the current texture target.
width width of the renderable area to copy, if 0, use the whole size.
height height of the renderable area to copy, if 0, use the whole size.
mipmapLevel the mipmap to copy texture to.

Implements NL3D::IDriver.

Definition at line 1934 of file driver_opengl_texture.cpp.

References _TextureTarget, _TextureTargetUpload, copyFrameBufferToTexture(), getRenderTargetSize(), and H_AUTO_OGL.

IOcclusionQuery * NL3D::CDriverGL::createOcclusionQuery (  )  [virtual]
IVertexBufferHardGL * NL3D::CDriverGL::createVertexBufferHard ( uint  size,
uint  numVertices,
CVertexBuffer::TPreferredMemory  vbType,
CVertexBuffer vb 
) [private, virtual]
void NL3D::CDriverGL::deleteARBFragmentPrograms (  )  [private]
void NL3D::CDriverGL::deleteFragmentShaders (  )  [private]
void NL3D::CDriverGL::deleteOcclusionQuery ( IOcclusionQuery oq  )  [virtual]
void NL3D::CDriverGL::disableHardwareTextureShader (  )  [virtual]
void NL3D::CDriverGL::disableHardwareVertexArrayAGP (  )  [virtual]
void NL3D::CDriverGL::disableHardwareVertexProgram (  )  [virtual]

Disable some Feature that may be supported by the Hardware Call before setDisplay() to work properly.

Implements NL3D::IDriver.

Definition at line 519 of file driver_opengl.cpp.

References _Extensions, NL3D::CGlExtensions::DisableHardwareVertexProgram, and H_AUTO_OGL.

void NL3D::CDriverGL::disableUserTextureMatrix (  ) 

disable all texture matrix

Definition at line 211 of file driver_opengl_material.cpp.

References _DriverGLStates, _UserTexMatEnabled, NL3D::CDriverGLStates::activeTextureARB(), and H_AUTO_OGL.

Referenced by setupMaterial().

void NL3D::CDriverGL::displayBench ( class NLMISC::CLog log  )  [virtual]
void NL3D::CDriverGL::doRefreshRenderSetup (  )  [private]
void NL3D::CDriverGL::enableFog ( bool  enable  )  [virtual]
void NL3D::CDriverGL::enableGlNormalize ( bool  normalize  )  [inline, private]

Test/activate normalisation of normal.

Definition at line 1029 of file driver_opengl.h.

References _CurrentGlNormalize.

Referenced by doRefreshRenderSetup(), and forceNormalize().

void NL3D::CDriverGL::enableLight ( uint8  num,
bool  enable = true 
) [virtual]

Enable / disable light.

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

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()

Implements NL3D::IDriver.

Definition at line 163 of file driver_opengl_light.cpp.

References _Extensions, _LightMapDynamicLightDirty, _MaxDriverLight, _UserLightEnable, enableLightInternal(), H_AUTO_OGL, and NL3D::CGlExtensions::IsGeforceFXOrAbove.

void NL3D::CDriverGL::enableLightInternal ( uint8  num,
bool  enable 
) [private]
NLMISC::IKeyboardDevice * NL3D::CDriverGL::enableLowLevelKeyboard ( bool  enable  )  [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 behavior

Implements NL3D::IDriver.

Definition at line 3007 of file driver_opengl.cpp.

References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().

NLMISC::IMouseDevice * NL3D::CDriverGL::enableLowLevelMouse ( bool  enable,
bool  exclusive 
) [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 behavior 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 2977 of file driver_opengl.cpp.

References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().

void NL3D::CDriverGL::enableNVTextureShader ( bool  enabled  )  [private]

nv texture shaders. Should be used only if this caps is present!

Definition at line 2917 of file driver_opengl.cpp.

References _NVTextureShaderEnabled, GL_TEXTURE_SHADER_NV, and H_AUTO_OGL.

Referenced by setupMaterial(), and setupWaterPassNV20().

void NL3D::CDriverGL::enablePolygonSmoothing ( bool  smooth  )  [virtual]

Use AntiAliasing For polygons (GL_POLYGON_SMOOTH like, not the FSAA).

See GL_POLYGON_SMOOTH help, and GL_SRC_ALPHA_SATURATE OpenGL doc (not yet implemented now since used only for alpha part in ShadowMap gen)

Implements NL3D::IDriver.

Definition at line 3693 of file driver_opengl.cpp.

References _PolygonSmooth, and H_AUTO_OGL.

void NL3D::CDriverGL::enableStencilTest ( bool  enable  )  [virtual]

Set stencil support.

Implements NL3D::IDriver.

Definition at line 4261 of file driver_opengl.cpp.

References _DriverGLStates, NL3D::CDriverGLStates::enableStencilTest(), and H_AUTO_OGL.

void NL3D::CDriverGL::enableUsedTextureMemorySum ( bool  enable  )  [virtual]

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

To retrieve the memory used call getUsedTextureMemory().

Implements NL3D::IDriver.

Definition at line 2826 of file driver_opengl.cpp.

References _SumTextureMemoryUsed, H_AUTO_OGL, and nlinfo.

void NL3D::CDriverGL::enableVertexProgramDoubleSidedColor ( bool  doubleSided  )  [private, 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 supported by driver

Implements NL3D::IDriver.

Definition at line 1864 of file driver_opengl_vertex_program.cpp.

References _Extensions, NL3D::CGlExtensions::ARBVertexProgram, GL_VERTEX_PROGRAM_TWO_SIDE_ARB, GL_VERTEX_PROGRAM_TWO_SIDE_NV, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgram.

void NL3D::CDriverGL::endBench (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 4041 of file driver_opengl.cpp.

void NL3D::CDriverGL::endCloudMultiPass (  )  [private]
void NL3D::CDriverGL::endDialogMode (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 4363 of file driver_opengl.cpp.

void NL3D::CDriverGL::endLightMapMultiPass (  )  [private]
virtual void NL3D::CDriverGL::endMaterialMultiPass (  )  [inline, virtual]

end multipass for this material.

Implements NL3D::IDriver.

Definition at line 621 of file driver_opengl.h.

References endMultiPass().

void NL3D::CDriverGL::endMultiPass (  )  [private]
void NL3D::CDriverGL::endPPLMultiPass (  )  [private]

Definition at line 1726 of file driver_opengl_material.cpp.

References H_AUTO_OGL.

Referenced by endMultiPass().

void NL3D::CDriverGL::endPPLNoSpecMultiPass (  )  [private]

Definition at line 1826 of file driver_opengl_material.cpp.

References H_AUTO_OGL.

Referenced by endMultiPass().

void NL3D::CDriverGL::endProfileIBLock ( std::vector< std::string > &  result  )  [virtual]

Implements NL3D::IDriver.

Definition at line 3801 of file driver_opengl.cpp.

void NL3D::CDriverGL::endProfileVBHardLock ( std::vector< std::string > &  result  )  [virtual]

If the driver support it, stop profile VBHard locks, and "print" result No-Op if already profiling NB: The results are the Locks in Chronological time (since last swapBuffers).

Since multiple frame are summed, an "*" is marked against the VBHard name to show if it was not always this one (ptr test and not name test) in the chronological order. NB: if the driver does not support VBHard or VBHard profiling (like ATI VBHard), result is empty. NB: ???? string is displayed if the VBHard has no name or if was just deleted.

Implements NL3D::IDriver.

Definition at line 3730 of file driver_opengl.cpp.

References _NumVBHardProfileFrame, _VBHardProfiles, _VBHardProfiling, NL3D::CDriverGL::CVBHardProfile::AccumTime, NL3D::CDriverGL::CVBHardProfile::Change, NLMISC::contReset(), NLMISC::smprintf(), NLMISC::CTime::ticksToSecond(), NLMISC::toString(), and NL3D::CDriverGL::CVBHardProfile::VBHard.

void NL3D::CDriverGL::endSpecularBatch (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 1130 of file driver_opengl_material.cpp.

References _SpecularBatchOn, H_AUTO_OGL, and setupSpecularEnd().

void NL3D::CDriverGL::endSpecularMultiPass (  )  [private]

Definition at line 1404 of file driver_opengl_material.cpp.

References _SpecularBatchOn, H_AUTO_OGL, and setupSpecularEnd().

Referenced by endMultiPass().

void NL3D::CDriverGL::endWaterMultiPass (  )  [private]
void NL3D::CDriverGL::fenceOnCurVBHardIfNeeded ( IVertexBufferHardGL newVBHard  )  [private]
bool NL3D::CDriverGL::fillBuffer ( CBitmap bitmap  )  [virtual]

fill the RGBA back buffer

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

Implements NL3D::IDriver.

Definition at line 2624 of file driver_opengl.cpp.

References NLMISC::CBitmap::getHeight(), NLMISC::CBitmap::getPixelFormat(), NLMISC::CBitmap::getPixels(), NLMISC::CBitmap::getWidth(), getWindowSize(), H_AUTO_OGL, NLMISC::CRect::Height, NLMISC::CBitmap::RGBA, and NLMISC::CRect::Width.

void NL3D::CDriverGL::finish (  )  [virtual]

force the driver to flush all command.

glFinish() in opengl. Interesting only for debug and profiling purpose.

Implements NL3D::IDriver.

Definition at line 3650 of file driver_opengl.cpp.

References H_AUTO_OGL.

void NL3D::CDriverGL::flush (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 3657 of file driver_opengl.cpp.

References H_AUTO_OGL.

bool NL3D::CDriverGL::fogEnabled (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 2713 of file driver_opengl.cpp.

References _FogEnabled, and H_AUTO_OGL.

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::forceActivateTexEnvMode ( uint  stage,
const CMaterial::CTexEnv env 
) [private]
void NL3D::CDriverGL::forceDXTCCompression ( bool  dxtcComp  )  [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.

Implements NL3D::IDriver.

Definition at line 1789 of file driver_opengl_texture.cpp.

References _ForceDXTCCompression, and H_AUTO_OGL.

void NL3D::CDriverGL::forceNativeFragmentPrograms ( bool  nativeOnly  )  [virtual]

Sets enforcement of native fragment programs.

This is by default enabled.

Parameters:
nativeOnly If set to false, fragment programs don't need to be native to stay loaded, otherwise (aka if true) they will be purged.

Implements NL3D::IDriver.

Definition at line 3489 of file driver_opengl.cpp.

References _ForceNativeFragmentPrograms.

virtual void NL3D::CDriverGL::forceNormalize ( bool  normalize  )  [inline, virtual]

Force input normal to be normalized by the driver.

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

  • current Model matrix has a scale.

Implements NL3D::IDriver.

Definition at line 396 of file driver_opengl.h.

References _ForceNormalize, and enableGlNormalize().

void NL3D::CDriverGL::forceTextureResize ( uint  divisor  )  [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

Implements NL3D::IDriver.

Definition at line 1796 of file driver_opengl_texture.cpp.

References _ForceTextureResizePower, NLMISC::clamp(), NLMISC::getPowerOf2(), and H_AUTO_OGL.

bool NL3D::CDriverGL::getAdapter ( uint  adapter,
CAdapter desc 
) const [virtual]
uint32 NL3D::CDriverGL::getAvailableVertexAGPMemory (  )  [virtual]

Return the amount of AGP memory allocated by initVertexBufferHard() to store vertices.

Implements NL3D::IDriver.

Definition at line 1721 of file driver_opengl_vertex.cpp.

References _AGPVertexArrayRange, H_AUTO_OGL, and NL3D::IVertexArrayRange::sizeAllocated().

Referenced by profileVBHardAllocation().

uint32 NL3D::CDriverGL::getAvailableVertexVRAMMemory (  )  [virtual]

Return the amount of video memory allocated by initVertexBufferHard() to store vertices.

Implements NL3D::IDriver.

Definition at line 1732 of file driver_opengl_vertex.cpp.

References _VRAMVertexArrayRange, H_AUTO_OGL, and NL3D::IVertexArrayRange::sizeAllocated().

Referenced by profileVBHardAllocation().

uint8 NL3D::CDriverGL::getBitPerPixel (  )  [virtual]

Return the depth of the driver after init().

Implements NL3D::IDriver.

Definition at line 2488 of file driver_opengl.cpp.

References _Depth, and H_AUTO_OGL.

NLMISC::CRGBA NL3D::CDriverGL::getBlendConstantColor (  )  const [virtual]

see supportBlendConstantColor().

Get the current Blend Constant Color.

Implements NL3D::IDriver.

Definition at line 3105 of file driver_opengl.cpp.

References _CurrentBlendConstantColor, and H_AUTO_OGL.

void NL3D::CDriverGL::getBuffer ( CBitmap bitmap  )  [virtual]

get the RGBA back buffer.

After swapBuffers(), the content of the back buffer is undefined.

Parameters:
bitmap the buffer will be written in this bitmap

Implements NL3D::IDriver.

Definition at line 2615 of file driver_opengl.cpp.

References NLMISC::CBitmap::flipV(), getBufferPart(), getWindowSize(), H_AUTO_OGL, NLMISC::CRect::Height, and NLMISC::CRect::Width.

void NL3D::CDriverGL::getBufferPart ( CBitmap bitmap,
NLMISC::CRect rect 
) [virtual]

get a part of the RGBA back buffer.

After swapBuffers(), the content of the back buffer is undefined. 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.

Implements NL3D::IDriver.

Definition at line 2581 of file driver_opengl.cpp.

References clipRect(), NLMISC::CBitmap::getPixels(), NLMISC::CObjectVector< T, EnableObjectBehavior >::getPtr(), H_AUTO_OGL, NLMISC::CRect::Height, NLMISC::CBitmap::reset(), NLMISC::CBitmap::resize(), NLMISC::CBitmap::RGBA, NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.

Referenced by getBuffer().

virtual float NL3D::CDriverGL::getClipSpaceZMin (  )  const [inline, virtual]

Implements NL3D::IDriver.

Definition at line 384 of file driver_opengl.h.

CDriverGL::TCullMode NL3D::CDriverGL::getCullMode (  )  const [virtual]

Implements NL3D::IDriver.

Definition at line 4254 of file driver_opengl.cpp.

References _DriverGLStates, NL3D::CDriverGLStates::getCullMode(), and H_AUTO_OGL.

bool NL3D::CDriverGL::getCurrentScreenMode ( GfxMode mode  )  [virtual]

return the current screen mode (if we are in windowed, return the screen mode behind the window)

Implements NL3D::IDriver.

Definition at line 1649 of file driver_opengl.cpp.

References _FullScreen, NL3D::GfxMode::Depth, dpy, NL3D::GfxMode::Frequency, H_AUTO_OGL, NL3D::GfxMode::Height, NLMISC::if(), nldebug, nlwarning, NL3D::GfxMode::OffScreen, NL3D::GfxMode::Width, and NL3D::GfxMode::Windowed.

const IVertexBufferHardGL* NL3D::CDriverGL::getCurrentVertexBufferHard (  )  const [inline]

Definition at line 1304 of file driver_opengl.h.

References _CurrentVertexBufferHard.

void NL3D::CDriverGL::getDepthRange ( float znear,
float zfar 
) const [virtual]

Implements NL3D::IDriver.

Definition at line 4240 of file driver_opengl.cpp.

References _DriverGLStates, NL3D::CDriverGLStates::getDepthRange(), and H_AUTO_OGL.

CTextureCube* NL3D::CDriverGL::getDiffuseCubeMap (  )  [inline, private]

Definition at line 996 of file driver_opengl.h.

References getSpecularCubeMap().

virtual void* NL3D::CDriverGL::getDisplay (  )  [inline, virtual]

Implements NL3D::IDriver.

Definition at line 319 of file driver_opengl.h.

uint NL3D::CDriverGL::getDoubleClickDelay ( bool  hardwareMouse  )  [virtual]

Get the delay in ms for mouse double clicks.

Implements NL3D::IDriver.

Definition at line 3049 of file driver_opengl.cpp.

References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().

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 490 of file driver_opengl.h.

virtual NLMISC::IEventEmitter* NL3D::CDriverGL::getEventEmitter ( void   )  [inline, virtual]

Implements NL3D::IDriver.

Definition at line 339 of file driver_opengl.h.

References _EventEmitter.

CRGBA NL3D::CDriverGL::getFogColor (  )  const [virtual]
float NL3D::CDriverGL::getFogEnd (  )  const [virtual]

Implements NL3D::IDriver.

Definition at line 2772 of file driver_opengl.cpp.

References _FogEnd, and H_AUTO_OGL.

float NL3D::CDriverGL::getFogStart (  )  const [virtual]

Get.

Implements NL3D::IDriver.

Definition at line 2765 of file driver_opengl.cpp.

References _FogStart, and H_AUTO_OGL.

CMatrix NL3D::CDriverGL::getFrustumMatrix (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 65 of file driver_opengl_matrix.cpp.

References H_AUTO_OGL, and NLMISC::CMatrix::set().

GLint NL3D::CDriverGL::getGlTextureFormat ( ITexture tex,
bool compressed 
) [private]
uint32 NL3D::CDriverGL::getHwnd (  )  [inline]

Definition at line 283 of file driver_opengl.h.

virtual uint32 NL3D::CDriverGL::getImplementationVersion (  )  const [inline, virtual]

Get the driver version.

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

See also:
InterfaceVersion

Implements NL3D::IDriver.

Definition at line 485 of file driver_opengl.h.

References ReleaseVersion.

NLMISC::IInputDeviceManager * NL3D::CDriverGL::getLowLevelInputDeviceManager (  )  [virtual]

Check whether 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 3036 of file driver_opengl.cpp.

References _EventEmitter, H_AUTO_OGL, and NLMISC::safe_cast().

uint NL3D::CDriverGL::getMaxLight (  )  const [virtual]

return the number of light supported by driver.

typically 8.

See also:
enableLight() setLight()

Implements NL3D::IDriver.

Definition at line 34 of file driver_opengl_light.cpp.

References _MaxDriverLight, and H_AUTO_OGL.

uint NL3D::CDriverGL::getMaxVerticesByVertexBufferHard (  )  const [virtual]

return How many vertices VertexBufferHard support

Implements NL3D::IDriver.

Definition at line 742 of file driver_opengl_vertex.cpp.

References _MaxVerticesByVBHard, and H_AUTO_OGL.

bool NL3D::CDriverGL::getModes ( std::vector< GfxMode > &  modes  )  [virtual]
uint NL3D::CDriverGL::getNbTextureStages (  )  const [virtual]

Get the number of texture stage available, for multi texturing (Normal material shaders). Valid only after setDisplay().

Implements NL3D::IDriver.

Definition at line 3113 of file driver_opengl.cpp.

References H_AUTO_OGL, and inlGetNumTextStages().

Referenced by checkTextureOn().

uint NL3D::CDriverGL::getNumAdapter (  )  const [virtual]

Adaptor information.

Implements NL3D::IDriver.

Definition at line 3974 of file driver_opengl.cpp.

References H_AUTO_OGL.

void NL3D::CDriverGL::getNumPerStageConstant ( uint lightedMaterial,
uint unlightedMaterial 
) const [virtual]

Get max number of per stage constant that can be used simultaneously.

This will usually match the number of texture stages, but with a D3D driver, this feature is not available most of the time so it is emulated. If pixel shaders are available this will be fully supported.

Implements NL3D::IDriver.

Definition at line 4351 of file driver_opengl.cpp.

References inlGetNumTextStages().

bool NL3D::CDriverGL::getRenderTargetSize ( uint32 width,
uint32 height 
) [virtual]

Retrieve the render target size.

If the render target is the frame buffer, it returns the size of the frame buffer. It the render target is a texture, it returns the size of the texture mipmap selected as render target.

Implements NL3D::IDriver.

Definition at line 1963 of file driver_opengl_texture.cpp.

References _TextureTarget, _WindowHeight, _WindowWidth, dpy, H_AUTO_OGL, and win.

Referenced by copyTargetToTexture().

CTextureCube * NL3D::CDriverGL::getSpecularCubeMap ( uint  exp  )  [private]
CMaterial::TShader NL3D::CDriverGL::getSupportedShader ( CMaterial::TShader  shader  )  [private]
virtual uint64 NL3D::CDriverGL::getSwapBufferCounter (  )  const [inline, virtual]

Implements NL3D::IDriver.

Definition at line 645 of file driver_opengl.h.

References _SwapBufferCounter.

uint NL3D::CDriverGL::getSwapVBLInterval (  )  [virtual]

get the number of VBL wait when a swapBuffers() is issued. 0 means no synchronisation to the VBL

Implements NL3D::IDriver.

Definition at line 3677 of file driver_opengl.cpp.

References _Extensions, _Interval, H_AUTO_OGL, and NL3D::CGlExtensions::WGLEXTSwapControl.

uint NL3D::CDriverGL::getTextureHandle ( const ITexture tex  )  [virtual]

Advanced usage.

Get the texture Handle.Useful for texture sorting for instance NB: if the texture is not setuped in the driver, 0 is returned. NB: if implementation does not support it, 0 may be returned. OpenGL ones return the Texture ID. NB: unlike isTextureExist(), this method is not thread safe.

Implements NL3D::IDriver.

Definition at line 1840 of file driver_opengl_texture.cpp.

References H_AUTO_OGL, NL3D::CTextureDrvInfosGL::ID, and NL3D::ITexture::TextureDrvShare.

uint32 NL3D::CDriverGL::getUsedTextureMemory (  )  const [virtual]

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

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

Implements NL3D::IDriver.

Definition at line 2837 of file driver_opengl.cpp.

References _TextureUsed, H_AUTO_OGL, and NL3D::CTextureDrvInfosGL::TextureMemory.

CVertexBuffer::TVertexColorType NL3D::CDriverGL::getVertexColorFormat (  )  const [virtual]

Tell if the vertex color memory format is RGBA (openGL) or BGRA (directx) BGRA : ***************************************************************** Offset: * 0 * 1 * 2 * 3 * ***************************************************************** RGBA * red * green * blue * alpha * ***************************************************************** BGRA * blue * green * red * alpha *

Implements NL3D::IDriver.

Definition at line 4015 of file driver_opengl.cpp.

References H_AUTO_OGL, and NL3D::CVertexBuffer::TRGBA.

const char * NL3D::CDriverGL::getVideocardInformation (  )  [virtual]

Get videocard informations.

get the official name of the driver

Implements NL3D::IDriver.

Definition at line 2494 of file driver_opengl.cpp.

References _Initialized, H_AUTO_OGL, and NLMISC::smprintf().

CMatrix NL3D::CDriverGL::getViewMatrix ( void   )  const [virtual]

Implements NL3D::IDriver.

Definition at line 149 of file driver_opengl_matrix.cpp.

References _UserViewMtx, and H_AUTO_OGL.

void NL3D::CDriverGL::getViewport ( CViewport viewport  )  [virtual]

Get the current viewport.

Implements NL3D::IDriver.

Definition at line 2261 of file driver_opengl.cpp.

References _CurrViewport, and H_AUTO_OGL.

Referenced by setRenderTarget().

void NL3D::CDriverGL::getWindowPos ( uint32 x,
uint32 y 
) [virtual]

Get the position of the window always (0,0) in fullscreen.

Implements NL3D::IDriver.

Definition at line 2449 of file driver_opengl.cpp.

References _OffScreen, _WindowX, _WindowY, and H_AUTO_OGL.

emptyProc NL3D::CDriverGL::getWindowProc (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 1760 of file driver_opengl.cpp.

References H_AUTO_OGL.

void NL3D::CDriverGL::getWindowSize ( uint32 width,
uint32 height 
) [virtual]

Get the width and the height of the window.

Implements NL3D::IDriver.

Definition at line 2420 of file driver_opengl.cpp.

References _OffScreen, _WindowHeight, _WindowWidth, dpy, H_AUTO_OGL, WGL_PBUFFER_HEIGHT_ARB, WGL_PBUFFER_WIDTH_ARB, and win.

Referenced by clipRect(), fillBuffer(), getBuffer(), getZBuffer(), and setRenderTarget().

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

get the ZBuffer (back buffer).

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

Implements NL3D::IDriver.

Definition at line 2607 of file driver_opengl.cpp.

References getWindowSize(), getZBufferPart(), H_AUTO_OGL, NLMISC::CRect::Height, and NLMISC::CRect::Width.

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

Implements NL3D::IDriver.

Definition at line 2593 of file driver_opengl.cpp.

References clipRect(), H_AUTO_OGL, NLMISC::CRect::Height, NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.

Referenced by getZBuffer().

void NL3D::CDriverGL::incrementResetCounter (  )  [inline]
bool NL3D::CDriverGL::init ( uint  windowIcon = 0,
emptyProc  exitFunc = 0 
) [virtual]

Implements NL3D::IDriver.

Definition at line 415 of file driver_opengl.cpp.

References dpy, H_AUTO_OGL, nldebug, nlerror, nlwarning, retrieveATIDriverVersion(), and NL3D::WndProc().

Referenced by renderRawQuads().

static void NL3D::CDriverGL::initCausticCubeMap (  )  [static, private]
void NL3D::CDriverGL::initEMBM (  )  [private]
void NL3D::CDriverGL::initFragmentShaders (  )  [private]
bool NL3D::CDriverGL::initVertexBufferHard ( 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 initVertexBufferHard(16Mo, 0); so this is not necessary. NB: If allocation fails, mem/=2, and retry, until mem < 500K.

Parameters:
agpMem amount of AGP Memory required. if 0, reseted.
vramMem amount 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 1650 of file driver_opengl_vertex.cpp.

References _AGPVertexArrayRange, _MaxVerticesByVBHard, _VRAMVertexArrayRange, NL3D::CVertexBuffer::AGPPreferred, NL3D::IVertexArrayRange::allocate(), H_AUTO_OGL, NL3D_DRV_VERTEXARRAY_MINIMUM_SIZE, nlinfo, resetVertexArrayRange(), NL3D::CVertexBuffer::StaticPreferred, and supportVertexBufferHard().

uint NL3D::CDriverGL::inlGetNumTextStages (  )  const [inline, private]
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 2478 of file driver_opengl.cpp.

References H_AUTO_OGL.

bool NL3D::CDriverGL::isEMBMSupportedAtStage ( uint  stage  )  const [virtual]
virtual bool NL3D::CDriverGL::isForceNormalize (  )  const [inline, virtual]

return the forceNormalize() state.

Implements NL3D::IDriver.

Definition at line 404 of file driver_opengl.h.

References _ForceNormalize.

virtual bool NL3D::CDriverGL::isLost (  )  const [inline, virtual]

Implements NL3D::IDriver.

Definition at line 295 of file driver_opengl.h.

bool NL3D::CDriverGL::isPolygonSmoothingEnabled (  )  const [virtual]

see enablePolygonSmoothing()

Implements NL3D::IDriver.

Definition at line 3707 of file driver_opengl.cpp.

References _PolygonSmooth, and H_AUTO_OGL.

bool NL3D::CDriverGL::isStencilTestEnabled (  )  const [virtual]
bool NL3D::CDriverGL::isTextureAddrModeSupported ( CMaterial::TTexAddressingMode  mode  )  const [virtual]

test whether a texture addressing mode is supported

Implements NL3D::IDriver.

Definition at line 2886 of file driver_opengl.cpp.

References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVTextureShader.

bool NL3D::CDriverGL::isTextureExist ( const ITexture tex  )  [virtual]

is the texture is set up in the driver NB: this method is thread safe.

Implements NL3D::IDriver.

Definition at line 1797 of file driver_opengl.cpp.

References NL3D::IDriver::_SyncTexDrvInfos, NL3D::IDriver::getTextureShareName(), and H_AUTO_OGL.

bool NL3D::CDriverGL::isTextureRectangle ( ITexture tex  )  const [private, virtual]
bool NL3D::CDriverGL::isVertexProgramEmulated (  )  const [private, virtual]

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

Implements NL3D::IDriver.

Definition at line 78 of file driver_opengl_vertex_program.cpp.

References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgramEmulated.

bool NL3D::CDriverGL::isVertexProgramEnabled (  )  const [inline, private]
bool NL3D::CDriverGL::isVertexProgramSupported (  )  const [private, virtual]
bool NL3D::CDriverGL::isWaterShaderSupported (  )  const [virtual]
bool NL3D::CDriverGL::isWndActive (  )  const [inline]
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 701 of file driver_opengl_vertex.cpp.

References _LastVB, H_AUTO_OGL, and setupUVPtr().

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 2801 of file driver_opengl.cpp.

References _AllocatedTextureMemory, and H_AUTO_OGL.

void NL3D::CDriverGL::profileIBAllocation ( std::vector< std::string > &  result  )  [virtual]

Implements NL3D::IDriver.

Definition at line 3807 of file driver_opengl.cpp.

void NL3D::CDriverGL::profileRenderedPrimitives ( CPrimitiveProfile pIn,
CPrimitiveProfile pOut 
) [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 ...).

Implements NL3D::IDriver.

Definition at line 2792 of file driver_opengl.cpp.

References _PrimitiveProfileIn, _PrimitiveProfileOut, and H_AUTO_OGL.

uint32 NL3D::CDriverGL::profileSetupedMaterials (  )  const [virtual]

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

Implements NL3D::IDriver.

Definition at line 2809 of file driver_opengl.cpp.

References _NbSetupMaterialCall, and H_AUTO_OGL.

uint32 NL3D::CDriverGL::profileSetupedModelMatrix (  )  const [virtual]

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

Implements NL3D::IDriver.

Definition at line 2817 of file driver_opengl.cpp.

References _NbSetupModelMatrixCall, and H_AUTO_OGL.

void NL3D::CDriverGL::profileVBHardAllocation ( std::vector< std::string > &  result  )  [virtual]
void NL3D::CDriverGL::refreshProjMatrixFromGL (  )  [private]

Definition at line 3121 of file driver_opengl.cpp.

References _GLProjMat, _ProjMatDirty, H_AUTO_OGL, and NLMISC::CMatrix::set().

Referenced by setConstantMatrix().

void NL3D::CDriverGL::refreshRenderSetup (  )  [inline, private]
bool NL3D::CDriverGL::release ( void   )  [virtual]

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

Reimplemented from NL3D::IDriver.

Definition at line 2022 of file driver_opengl.cpp.

References _AGPVertexArrayRange, _FullScreen, _Initialized, _OcclusionQueryList, _OffScreen, _SwapBufferCounter, _VRAMVertexArrayRange, ctx, deleteFragmentShaders(), deleteOcclusionQuery(), dpy, H_AUTO_OGL, nlinfo, nlwarning, resetVertexArrayRange(), and win.

Referenced by ~CDriverGL().

bool NL3D::CDriverGL::renderLines ( CMaterial mat,
uint32  firstIndex,
uint32  nlines 
) [virtual]

Render a list of indexed lines with previously setuped VertexBuffer / IndexBuffer / Matrixes.

Parameters:
mat is the material to use during this rendering
firstIndex is the first index in the index buffer to use as first line.
nlines is the number of line to render.

Implements NL3D::IDriver.

Definition at line 261 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, NL3D::CIndexBufferInfo::_Format, _LastIB, _PrimitiveProfileIn, _PrimitiveProfileOut, NL3D::CIndexBufferInfo::_Values, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::IVertexBufferHardGL::isInvalid(), nlassert, NL3D::CPrimitiveProfile::NLines, refreshRenderSetup(), setupMaterial(), and setupPass().

virtual bool NL3D::CDriverGL::renderLinesWithIndexOffset ( CMaterial mat,
uint32  firstIndex,
uint32  nlines,
uint  indexOffset 
) [inline, virtual]

If the driver support it, primitive can be rendered with an offset added to each index These are the offseted version of the 'render' functions.

See also:
supportIndexOffset

Implements NL3D::IDriver.

Definition at line 440 of file driver_opengl.h.

References nlassertex, and UNSUPPORTED_INDEX_OFFSET_MSG.

bool NL3D::CDriverGL::renderRawLines ( CMaterial mat,
uint32  startVertex,
uint32  numTri 
) [virtual]

Render lines with previously setuped VertexBuffer / Matrixes.

Lines are stored as a sequence in the vertex buffer.

Parameters:
mat is the material to use during this rendering
startVertex is the first vertex to use during this rendering.
numLine is the number of line to render.

Implements NL3D::IDriver.

Definition at line 446 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::IVertexBufferHardGL::isInvalid(), NL3D::CPrimitiveProfile::NLines, refreshRenderSetup(), setupMaterial(), and setupPass().

bool NL3D::CDriverGL::renderRawPoints ( CMaterial mat,
uint32  startVertex,
uint32  numPoints 
) [virtual]

Render points with previously setuped VertexBuffer / Matrixes.

Points are stored as a sequence in the vertex buffer.

Parameters:
mat is the material to use during this rendering
startVertex is the first vertex to use during this rendering.
numPoints is the number of point to render.

Implements NL3D::IDriver.

Definition at line 405 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::IVertexBufferHardGL::isInvalid(), NL3D::CPrimitiveProfile::NPoints, refreshRenderSetup(), setupMaterial(), and setupPass().

bool NL3D::CDriverGL::renderRawQuads ( CMaterial mat,
uint32  startVertex,
uint32  numQuads 
) [virtual]

render quads with previously setuped VertexBuffer / Matrixes.

Quads are stored as a sequence in the vertex buffer. There's a guaranty for the orientation of its diagonal, which is drawn as follow :

3----2 | / | | / | |/ | 0----1

Parameters:
mat is the material to use during this rendering
startVertex is the first vertex to use during this rendering.
numQuad is the number of quad to render.

Implements NL3D::IDriver.

Definition at line 530 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, init(), NL3D::IVertexBufferHardGL::isInvalid(), min, NL3D::CPrimitiveProfile::NQuads, refreshRenderSetup(), setupMaterial(), and setupPass().

bool NL3D::CDriverGL::renderRawTriangles ( CMaterial mat,
uint32  startVertex,
uint32  numTri 
) [virtual]

Render triangles with previously setuped VertexBuffer / Matrixes.

Triangles are stored as a sequence in the vertex buffer.

Parameters:
mat is the material to use during this rendering
startVertex is the first vertex to use during this rendering.
numTri is the number of triangle to render.

Implements NL3D::IDriver.

Definition at line 487 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, _PrimitiveProfileIn, _PrimitiveProfileOut, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::IVertexBufferHardGL::isInvalid(), NL3D::CPrimitiveProfile::NTriangles, refreshRenderSetup(), setupMaterial(), and setupPass().

bool NL3D::CDriverGL::renderSimpleTriangles ( uint32  firstIndex,
uint32  ntris 
) [virtual]

Render a list of triangles with previously setuped VertexBuffer / IndexBuffer / 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 useful for landscape....

Parameters:
firstIndex is the first index in the index buffer to use as first triangle.
ntris is the number of triangle to render.

Implements NL3D::IDriver.

Definition at line 366 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, NL3D::CIndexBufferInfo::_Format, _LastIB, _PrimitiveProfileIn, _PrimitiveProfileOut, NL3D::CIndexBufferInfo::_Values, NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::IVertexBufferHardGL::isInvalid(), nlassert, NL3D::CPrimitiveProfile::NTriangles, and refreshRenderSetup().

virtual bool NL3D::CDriverGL::renderSimpleTrianglesWithIndexOffset ( uint32  ,
uint32  ,
uint   
) [inline, virtual]

Implements NL3D::IDriver.

Definition at line 442 of file driver_opengl.h.

References nlassertex, and UNSUPPORTED_INDEX_OFFSET_MSG.

bool NL3D::CDriverGL::renderTriangles ( CMaterial mat,
uint32  firstIndex,
uint32  ntris 
) [virtual]

Render a list of indexed triangles with previously setuped VertexBuffer / IndexBuffer / Matrixes.

Parameters:
mat is the material to use during this rendering
firstIndex is the first index in the index buffer to use as first triangle.
ntris is the number of triangle to render.

Implements NL3D::IDriver.

Definition at line 312 of file driver_opengl_vertex.cpp.

References _CurrentVertexBufferHard, NL3D::CIndexBufferInfo::_Format, _LastIB, _PrimitiveProfileIn, _PrimitiveProfileOut, NL3D::CIndexBufferInfo::_Values, beginMultiPass(), endMultiPass(), NL3D::IVertexBufferHardGL::GPURenderingAfterFence, H_AUTO_OGL, NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::IVertexBufferHardGL::isInvalid(), nlassert, NL3D::CPrimitiveProfile::NTriangles, refreshRenderSetup(), setupMaterial(), and setupPass().

virtual bool NL3D::CDriverGL::renderTrianglesWithIndexOffset ( CMaterial ,
uint32  ,
uint32  ,
uint   
) [inline, virtual]

Implements NL3D::IDriver.

Definition at line 441 of file driver_opengl.h.

References nlassertex, and UNSUPPORTED_INDEX_OFFSET_MSG.

void NL3D::CDriverGL::resetLightMapVertexSetup (  )  [private]
void NL3D::CDriverGL::resetTextureShaders (  )  [private]
void NL3D::CDriverGL::resetVertexArrayRange (  )  [private]
void NL3D::CDriverGL::retrieveATIDriverVersion (  )  [private]

Definition at line 3860 of file driver_opengl.cpp.

References _ATIDriverVersion, _ATIFogRangeFixed, NLMISC::fromString(), H_AUTO_OGL, and NLMISC::toLower().

Referenced by init().

bool NL3D::CDriverGL::setAdapter ( uint  adapter  )  [virtual]

Choose the hardware renderer.

Call it before the setDisplay and enumModes methods Choose adapter = 0xffffffff for the default one.

Implements NL3D::IDriver.

Definition at line 4006 of file driver_opengl.cpp.

References H_AUTO_OGL.

void NL3D::CDriverGL::setAmbientColor ( CRGBA  color  )  [virtual]

Set ambient.

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

Implements NL3D::IDriver.

Definition at line 206 of file driver_opengl_light.cpp.

References NLMISC::CRGBA::B, NLMISC::CRGBA::G, H_AUTO_OGL, and NLMISC::CRGBA::R.

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 2512 of file driver_opengl.cpp.

References dpy, H_AUTO_OGL, and win.

void NL3D::CDriverGL::setColorMask ( bool  bRed,
bool  bGreen,
bool  bBlue,
bool  bAlpha 
) [virtual]

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

Implements NL3D::IDriver.

Definition at line 1861 of file driver_opengl.cpp.

References H_AUTO_OGL.

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  d0,
double  d1,
double  d2,
double  d3 
) [private, virtual]
void NL3D::CDriverGL::setConstant ( uint  index,
float  ,
float  ,
float  ,
float   
) [private, virtual]
void NL3D::CDriverGL::setConstantFog ( uint  index  )  [private, virtual]

Setup the constant with the fog vector.

This vector must be used to get the final fog value in a vertex shader. You must use it like this: DP4 o[FOGC].x, c[4], R4; With c[4] the constant used for the fog vector and R4 the vertex local position.

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

Parameters:
index is the index where to store the vector.

Implements NL3D::IDriver.

Definition at line 1855 of file driver_opengl_vertex_program.cpp.

References _ModelViewMatrix, NLMISC::CMatrix::get(), H_AUTO_OGL, and setConstant().

void NL3D::CDriverGL::setConstantMatrix ( uint  index,
IDriver::TMatrix  matrix,
IDriver::TTransform  transform 
) [private, 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.

Implements NL3D::IDriver.

Definition at line 1779 of file driver_opengl_vertex_program.cpp.

References _EVSConstantHandle, _Extensions, _GLProjMat, _ModelViewMatrix, NL3D::CGlExtensions::ARBVertexProgram, NLMISC::CMatrix::get(), GL_IDENTITY_NV, GL_VERTEX_PROGRAM_ARB, GL_VERTEX_PROGRAM_NV, GLMatrix, GLTransform, H_AUTO_OGL, NL3D::IDriver::Identity, NL3D::IDriver::Inverse, NL3D::IDriver::InverseTranspose, NLMISC::CMatrix::invert(), NL3D::IDriver::ModelView, NL3D::IDriver::ModelViewProjection, nglProgramEnvParameter4fvARB, nglSetInvariantEXT, nglTrackMatrixNV, NL3D::CGlExtensions::NVVertexProgram, NL3D::IDriver::Projection, refreshProjMatrixFromGL(), refreshRenderSetup(), NLMISC::CMatrix::transpose(), and NL3D::IDriver::Transpose.

void NL3D::CDriverGL::setCullMode ( TCullMode  cullMode  )  [virtual]

Set cull mode Useful for mirrors / cube map rendering or when the scene must be rendered upside down.

Implements NL3D::IDriver.

Definition at line 4247 of file driver_opengl.cpp.

References _DriverGLStates, H_AUTO_OGL, and NL3D::CDriverGLStates::setCullMode().

void NL3D::CDriverGL::setDepthRange ( float  znear,
float  zfar 
) [virtual]

Set depth range.

Depth range specify a linear mapping from device z coordinates (in the [-1, 1] range) to window coordinates (in the [0, 1] range) This mapping occurs after clipping of primitives and division by w of vertices coordinates. Default depth range is [0, 1]. NB : znear should be different from zfar or an assertion is raised

Implements NL3D::IDriver.

Definition at line 4233 of file driver_opengl.cpp.

References _DriverGLStates, H_AUTO_OGL, and NL3D::CDriverGLStates::setDepthRange().

bool NL3D::CDriverGL::setDisplay ( void *  wnd,
const GfxMode mode,
bool  show,
bool  resizeable 
) throw (EBadDisplay) [virtual]
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]

Implements NL3D::IDriver.

Definition at line 30 of file driver_opengl_matrix.cpp.

References _OODeltaZ, _ProjMatDirty, and H_AUTO_OGL.

void NL3D::CDriverGL::setFrustumMatrix ( CMatrix frust  )  [virtual]

Implements NL3D::IDriver.

Definition at line 53 of file driver_opengl_matrix.cpp.

References NLMISC::CMatrix::get(), and H_AUTO_OGL.

void NL3D::CDriverGL::setLight ( uint8  num,
const CLight light 
) [virtual]

Setup a light.

You must call enableLight() to active the light.

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

Implements NL3D::IDriver.

Definition at line 43 of file driver_opengl_light.cpp.

References _LightMapDynamicLightDirty, _UserLight0, H_AUTO_OGL, and setLightInternal().

void NL3D::CDriverGL::setLightInternal ( uint8  num,
const CLight light 
) [private]
void NL3D::CDriverGL::setLightMapDynamicLight ( bool  enable,
const CLight light 
) [virtual]

Setup the unique light used for Lightmap Shader.

Lightmaped primitives are lit per vertex with this light (should be local attenuated for maximum efficiency) This is only useful for material that have their shader set as 'LightMap'

Parameters:
the light used for per pixel lighting

Implements NL3D::IDriver.

Definition at line 312 of file driver_opengl_light.cpp.

References _LightMapDynamicLight, _LightMapDynamicLightDirty, _LightMapDynamicLightEnabled, and H_AUTO_OGL.

void NL3D::CDriverGL::setMatrix2DForTextureOffsetAddrMode ( const uint  stage,
const float  mat[4] 
) [virtual]

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

Implements NL3D::IDriver.

Definition at line 2902 of file driver_opengl.cpp.

References _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), GL_OFFSET_TEXTURE_MATRIX_NV, GL_TEXTURE_SHADER_NV, H_AUTO_OGL, inlGetNumTextStages(), nlassert, and supportTextureShaders().

bool NL3D::CDriverGL::setMode ( const GfxMode mode  )  [virtual]
bool NL3D::CDriverGL::setMonitorColorProperties ( const CMonitorColorProperties properties  )  [virtual]

Setup monitor color properties.

Return false if setup failed.

Implements NL3D::IDriver.

Definition at line 3136 of file driver_opengl.cpp.

References NL3D::CMonitorColorProperties::Contrast, NL3D::CMonitorColorProperties::Gamma, H_AUTO_OGL, NL3D::CMonitorColorProperties::Luminosity, min, and nlwarning.

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

x and y must be between 0.0 and 1.0

Implements NL3D::IDriver.

Definition at line 2397 of file driver_opengl.cpp.

References _WindowHeight, _WindowWidth, dpy, H_AUTO_OGL, and win.

void NL3D::CDriverGL::setPerPixelLightingLight ( CRGBA  diffuse,
CRGBA  specular,
float  shininess 
) [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

Implements NL3D::IDriver.

Definition at line 2967 of file driver_opengl.cpp.

References _PPLExponent, _PPLightDiffuseColor, _PPLightSpecularColor, and H_AUTO_OGL.

void NL3D::CDriverGL::setPolygonMode ( TPolygonMode  mode  )  [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 from NL3D::IDriver.

Definition at line 2690 of file driver_opengl.cpp.

References NL3D::IDriver::_PolygonMode, NL3D::IDriver::Filled, H_AUTO_OGL, NL3D::IDriver::Line, and NL3D::IDriver::Point.

bool NL3D::CDriverGL::setRenderTarget ( ITexture tex,
uint32  x,
uint32  y,
uint32  width,
uint32  height,
uint32  mipmapLevel,
uint32  cubeFace 
) [virtual]

Set the current render target.

The render target can be a texture (tex pointer) or the back buffer (tex = NULL). 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 data 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.

When direct render to texture is not available (openGl), it uses the frame buffer for the rendering and copy the frame buffer content into the texture when setRenderTarget(NULL) is called.

The x, y, width and height parameters are only used in this case to optimize the copy from the framebuffer to the texture.

If a texture is set as target, the viewport and the scissor are now relative to the texture sizes, and not to the x, y, width and height parameters.

The texture content can be lost after the first setRenderTarget().

The texture must have the render target abilities enabled. (ITexture::setRenderTarget ())

Parameters:
tex the texture to render into.
x x position within the destination texture of the renderable area.
y y position within the destination texture of the renderable area.
width width of the renderable area, if 0, use the whole size.
height height of the renderable area, if 0, use the whole size.
mipmapLevel the mipmap to copy texture to.
cubaFace the face of the cube to copy texture to.
Returns:
true if the render target has been changed

Implements NL3D::IDriver.

Definition at line 1865 of file driver_opengl_texture.cpp.

References _CurrScissor, _CurrViewport, _OldViewport, _RenderTargetFBO, _TextureTarget, _TextureTargetCubeFace, _TextureTargetHeight, _TextureTargetLevel, _TextureTargetUpload, _TextureTargetWidth, _TextureTargetX, _TextureTargetY, activeFrameBufferObject(), copyFrameBufferToTexture(), NL3D::ITexture::getRenderTarget(), getViewport(), getWindowSize(), H_AUTO_OGL, NL3D::CViewport::init(), NL3D::ITexture::isBloomTexture(), nlassertex, setupScissor(), setupViewport(), and supportBloomEffect().

void NL3D::CDriverGL::setSwapVBLInterval ( uint  interval  )  [virtual]

set the number of VBL wait when a swapBuffers() is issued.

0 means no synchronisation to the VBL Default is 1. Values >1 may be clamped to 1 by the driver.

Implements NL3D::IDriver.

Definition at line 3664 of file driver_opengl.cpp.

References _Extensions, _Initialized, _Interval, H_AUTO_OGL, and NL3D::CGlExtensions::WGLEXTSwapControl.

void NL3D::CDriverGL::setTextureEnvFunction ( uint  stage,
CMaterial mat 
)
void NL3D::CDriverGL::setTextureShaders ( const uint8 addressingModes,
const NLMISC::CSmartPtr< ITexture > *  textures 
) [private]

set texture shaders from stage 0 to stage IDRV_MAT_MAXTEXTURES - 1 textures are needed to setup the right kind of shader (cubic or 2d texture)

Definition at line 260 of file driver_opengl_material.cpp.

References _CurrentTexAddrMode, _DriverGLStates, NL3D::CDriverGLStates::activeTextureARB(), NL3D::convTexAddr(), GL_SHADER_OPERATION_NV, GL_TEXTURE_SHADER_NV, GLenum(), H_AUTO_OGL, and NL3D::IDRV_MAT_MAXTEXTURES.

Referenced by setupMaterial(), and setupWaterPassNV20().

bool NL3D::CDriverGL::setupARBVertexProgram ( const CVPParser::TProgram parsedProgram,
GLuint  id,
bool specularWritten 
) [private]
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.

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 385 of file driver_opengl_vertex_program.cpp.

References _ATIFogRangeFixed, _EVSColorHandle, _EVSConstantHandle, _EVSNormalHandle, _EVSNumConstant, _EVSPositionHandle, _EVSTexHandle, CVPInstruction::ADD, CVPOperand::AddressRegister, CVPInstruction::ARL, CVPSwizzle::Comp, CVPOperand::Constant, CVPOperand::ConstantValue, NL3D::convInputRegisterToVBFlag(), NL3D::convOutputRegisterToEXTVertexShader(), NL3D::convSwizzleToGLFormat(), NL3D::doSwizzle(), NL3D::doWriteMask(), CVPInstruction::DP3, CVPInstruction::DP4, CVPInstruction::DST, EVS_INFO, EVSFogCoordsVariant, 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(), GLenum(), GLuint(), H_AUTO_OGL, CVPOperand::IFogCoord, CVPOperand::Indexed, CVPOperand::InputRegister, CVPOperand::InputRegisterValue, CVPOperand::IPaletteSkin, CVPOperand::ISecondaryColor, CVPSwizzle::isIdentity(), CVPParser::isInputUsed(), CVPOperand::IWeight, 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, CVPOperand::OutputRegisterValue, CVPInstruction::RCP, CVPInstruction::RSQ, CVPInstruction::SGE, CVPInstruction::SLT, CVPOperand::Swizzle, NLMISC::toString(), CVPOperand::Type, CVPOperand::Value, CVPOperand::Variable, and CVPOperand::VariableValue.

Referenced by activeEXTVertexShader().

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

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

Special : with vertex program, using the extension EXT_vertex_shader, fog is emulated using 1 more constant to scale result to [0, 1]

Implements NL3D::IDriver.

Definition at line 2726 of file driver_opengl.cpp.

References _ATIFogRangeFixed, _CurrentFogColor, _EVSNumConstant, _Extensions, _FogEnd, _FogStart, NLMISC::CRGBA::A, NL3D::CGlExtensions::ARBVertexProgram, NLMISC::CRGBA::B, NL3D::CGlExtensions::EXTVertexShader, NLMISC::CRGBA::G, H_AUTO_OGL, NL3D::CGlExtensions::NVVertexProgram, NLMISC::CRGBA::R, and setConstant().

void NL3D::CDriverGL::setupGlArrays ( CVertexBufferInfo vb  )  [private]
void NL3D::CDriverGL::setupGlArraysForARBVertexProgram ( CVertexBufferInfo vb  )  [private]
void NL3D::CDriverGL::setupGlArraysForEXTVertexShader ( CVertexBufferInfo vb  )  [private]

Definition at line 1339 of file driver_opengl_vertex.cpp.

References _DriverGLStates, NL3D::CVertexProgram::_DrvInfo, _LastSetuppedVP, NL3D::CDriverGLStates::bindARBVertexBuffer(), NL3D::CDriverGLStates::clientActiveTextureARB(), NL3D::CVertexBuffer::Empty, NL3D::CDriverGLStates::enableVertexAttribArrayForEXTVertexShader(), EVSFogCoordsVariant, EVSPaletteSkinVariant, EVSSecondaryColorVariant, EVSSkinWeightVariant, NL3D::CVertexBuffer::Fog, GLType, GLVertexAttribIndex, H_AUTO_OGL, NL3D::CVertexBufferInfo::HwARB, NL3D::CVertexBufferInfo::HwATI, nglArrayObjectATI, nglVariantArrayObjectATI, nglVariantPointerEXT, nlassert, nlstop, NL3D::CVertexBuffer::Normal, NumCoordinatesType, NL3D::CVertexBuffer::NumValue, NL3D::CVertexBuffer::PaletteSkin, NL3D::CVertexBuffer::Position, NL3D::CVertexBuffer::PrimaryColor, NLMISC::safe_cast(), NL3D::CVertexBuffer::SecondaryColor, NL3D::CVertexBuffer::TexCoord0, NL3D::CVertexBuffer::TexCoord1, NL3D::CVertexBuffer::TexCoord2, NL3D::CVertexBuffer::TexCoord3, NL3D::CVertexBuffer::TexCoord4, NL3D::CVertexBuffer::TexCoord5, NL3D::CVertexBuffer::TexCoord6, NL3D::CVertexBuffer::TexCoord7, NL3D::CVertexBufferInfo::Type, NL3D::CVertexProgamDrvInfosGL::UsedVertexComponents, NL3D::CVertexBufferInfo::ValuePtr, NL3D::CVertexProgamDrvInfosGL::Variants, NL3D::CVertexBufferInfo::VBMode, NL3D::CVertexBufferInfo::VertexFormat, NL3D::CVertexBufferInfo::VertexObjectId, NL3D::CVertexBufferInfo::VertexSize, and NL3D::CVertexBuffer::Weight.

Referenced by setupGlArrays().

void NL3D::CDriverGL::setupGlArraysForNVVertexProgram ( CVertexBufferInfo vb  )  [private]
void NL3D::CDriverGL::setupGlArraysStd ( CVertexBufferInfo vb  )  [private]
void NL3D::CDriverGL::setupLightMapDynamicLighting ( bool  enable  )  [private]
void NL3D::CDriverGL::setupLightMapPass ( uint  pass  )  [private]
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 282 of file driver_opengl_material.cpp.

References _CurrentMaterial, _CurrentMaterialSupportedShader, _DriverGLStates, _Extensions, _FogEnabled, _LastVertexSetupIsLightMap, NL3D::CMaterial::_LightMaps, NL3D::CMaterial::_MatDrvInfo, NL3D::IDriver::_MatDrvInfos, _MaterialAllTextureTouchedFlag, _NbSetupMaterialCall, _OODeltaZ, NL3D::CMaterial::_TexAddrMode, NL3D::CMaterial::_Textures, NLMISC::CRGBA::A, activateTexture(), NL3D::CDriverGLStates::alphaFunc(), NL3D::CShaderGL::Ambient, NLMISC::CRGBA::B, NLMISC::blend(), NL3D::CDriverGLStates::blendFunc(), NL3D::CMaterial::clearTouched(), NL3D::CMaterial::Cloud, NL3D::convBlend(), NL3D::convColor(), NL3D::convZFunction(), NL3D::CDriverGLStates::depthFunc(), NL3D::CShaderGL::Diffuse, disableUserTextureMatrix(), NL3D::CShaderGL::DstBlend, NL3D::CShaderGL::Emissive, NL3D::CDriverGLStates::enableAlphaTest(), NL3D::CDriverGLStates::enableBlend(), NL3D::CDriverGLStates::enableCullFace(), NL3D::CDriverGLStates::enableFog(), NL3D::CDriverGLStates::enableLighting(), enableNVTextureShader(), NL3D::CDriverGLStates::enableZWrite(), NLMISC::CRGBA::G, NL3D::CMaterial::getAlphaTestThreshold(), NL3D::CMaterial::getAmbient(), NL3D::CMaterial::getColor(), NL3D::CMaterial::getDiffuse(), NL3D::CMaterial::getDstBlend(), NL3D::CMaterial::getEmissive(), NL3D::CMaterial::getFlags(), NLMISC::CRGBA::getPacked(), NL3D::CMaterial::getShader(), NL3D::CMaterial::getShininess(), NL3D::CMaterial::getSpecular(), NL3D::CMaterial::getSrcBlend(), getSupportedShader(), NL3D::CMaterial::getTexture(), NL3D::CMaterial::getTouched(), NL3D::CMaterial::getZBias(), NL3D::CMaterial::getZFunc(), GLenum(), H_AUTO_OGL, 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::CMaterial::isLightedVertexColor(), NL3D::CMaterial::LightMap, NL3D::CMaterial::Normal, NL3D::CGlExtensions::NVTextureShader, NL3D::CShaderGL::PackedAmbient, NL3D::CShaderGL::PackedDiffuse, NL3D::CShaderGL::PackedEmissive, NL3D::CShaderGL::PackedSpecular, NL3D::CMaterial::PerPixelLighting, NLMISC::CRGBA::R, resetLightMapVertexSetup(), NL3D::CDriverGLStates::setAmbient(), NL3D::CDriverGLStates::setDiffuse(), NL3D::CDriverGLStates::setEmissive(), NL3D::CDriverGLStates::setShininess(), NL3D::CDriverGLStates::setSpecular(), setTextureEnvFunction(), setTextureShaders(), setupLightMapDynamicLighting(), setupTexture(), setupUserTextureMatrix(), NL3D::CDriverGLStates::setVertexColorLighted(), NL3D::CDriverGLStates::setZBias(), NL3D::CMaterial::Specular, NL3D::CShaderGL::Specular, NL3D::CShaderGL::SrcBlend, NL3D::CShaderGL::SupportedShader, NL3D::CMaterial::Water, and NL3D::CShaderGL::ZComp.

Referenced by renderLines(), renderRawLines(), renderRawPoints(), renderRawQuads(), renderRawTriangles(), and renderTriangles().

virtual void NL3D::CDriverGL::setupMaterialPass ( uint  pass  )  [inline, virtual]

active the ith pass of this material.

Implements NL3D::IDriver.

Definition at line 619 of file driver_opengl.h.

References setupPass().

void NL3D::CDriverGL::setupModelMatrix ( const CMatrix mtx  )  [virtual]
void NL3D::CDriverGL::setupPass ( uint  pass  )  [private]
void NL3D::CDriverGL::setupPPLNoSpecPass ( uint  pass  )  [private]
void NL3D::CDriverGL::setupPPLPass ( uint  pass  )  [private]
void NL3D::CDriverGL::setupScissor ( const class CScissor scissor  )  [virtual]

Set the current Scissor.

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

Implements NL3D::IDriver.

Definition at line 2270 of file driver_opengl.cpp.

References _CurrScissor, _TextureTarget, _WindowHeight, _WindowWidth, NLMISC::clamp(), dpy, H_AUTO_OGL, NL3D::CScissor::Height, NL3D::CScissor::Width, win, NL3D::CScissor::X, and NL3D::CScissor::Y.

Referenced by setRenderTarget().

void NL3D::CDriverGL::setupSpecularBegin (  )  [private]
void NL3D::CDriverGL::setupSpecularEnd (  )  [private]
void NL3D::CDriverGL::setupSpecularPass ( uint  pass  )  [private]
bool NL3D::CDriverGL::setupTexture ( ITexture tex  )  [virtual]

setup a texture, generate and upload if needed.

same as setupTextureEx(tex, true, dummy);

Implements NL3D::IDriver.

Definition at line 518 of file driver_opengl_texture.cpp.

References H_AUTO_OGL, and setupTextureEx().

Referenced by copyFrameBufferToTexture(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupWaterPassARB(), setupWaterPassNV20(), setupWaterPassR200(), and swapTextureHandle().

void NL3D::CDriverGL::setupTextureBasicParameters ( ITexture tex  )  [inline, private]
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 589 of file driver_opengl_texture.cpp.

References _AllocatedTextureMemory, _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _ForceTextureResizePower, NL3D::ITexture::_ListInvalidRect, NL3D::IDriver::_SyncTexDrvInfos, NL3D::IDriver::_TexDrvShares, activateTexture(), NL3D::ITexture::allowDegradation(), NL3D::CGlExtensions::ARBTextureCubeMap, bindTextureWithMode(), NLMISC::CBitmap::buildMipMaps(), NLMISC::clamp(), NL3D::ITexture::clearTouched(), NL3D::CTextureDrvInfosGL::Compressed, computeMipMapMemoryUsage(), NLMISC::CBitmap::convertToType(), CTextureDrvInfosGL, NL3D::IDriver::CTextureDrvShare, NL3D::CGlExtensions::EXTTextureCompressionS3TC, NL3D::ITexture::filterOrWrapModeTouched(), NLMISC::CBitmap::flipH(), NLMISC::CBitmap::flipV(), NL3D::ITexture::generate(), NL3D::getGlSrcTextureComponentType(), NL3D::getGlSrcTextureFormat(), getGlTextureFormat(), NLMISC::CBitmap::getHeight(), NLMISC::CBitmap::getMipMapCount(), NLMISC::CBitmap::getPixelFormat(), NLMISC::CBitmap::getPixels(), NLMISC::CObjectVector< T, EnableObjectBehavior >::getPtr(), NL3D::ITexture::getReleasable(), NLMISC::CBitmap::getSize(), NL3D::CTextureCube::getTexture(), NL3D::getTextureGl(), NL3D::IDriver::getTextureShareName(), NLMISC::CBitmap::getWidth(), GLenum(), H_AUTO_OGL, NLMISC::CRect::Height, inlGetNumTextStages(), NL3D::ITexture::isAllInvalidated(), NL3D::ITexture::isTextureCube(), isTextureRectangle(), min, NL3D::CTextureDrvInfosGL::MipMap, NL3D::ITexture::mipMapOn(), NL3D::CTextureCube::negative_x, NL3D::CTextureCube::negative_y, NL3D::CTextureCube::negative_z, NEL_MEASURE_UPLOAD_TIME_END, NEL_MEASURE_UPLOAD_TIME_START, nglCompressedTexImage2DARB, NLCubeFaceToGLCubeFace, NL3D::CTextureCube::positive_x, NL3D::CTextureCube::positive_y, NL3D::CTextureCube::positive_z, NL3D::ITexture::release(), NLMISC::CBitmap::releaseMipMaps(), NLMISC::CBitmap::resample(), NLMISC::CBitmap::RGBA, NLMISC::safe_cast(), NL3D::sameDXTCFormat(), NL3D::CDriverGLStates::setTextureMode(), setupTextureBasicParameters(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), NL3D::ITexture::supportSharing(), NL3D::CDriverGLStates::TextureDisabled, NL3D::ITexture::TextureDrvShare, NL3D::CTextureDrvInfosGL::TextureMemory, NL3D::CTextureDrvInfosGL::TextureMode, NL3D::ITexture::touched(), NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.

Referenced by setupTexture().

void NL3D::CDriverGL::setupUserTextureMatrix ( uint  numStages,
CMaterial mat 
)
void NL3D::CDriverGL::setupUVPtr ( uint  stage,
CVertexBufferInfo VB,
uint  uvId 
) [private]
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 82 of file driver_opengl_matrix.cpp.

References _LightDirty, _LightSetupDirty, _ModelViewMatrixDirty, _PZBCameraPos, _RenderSetupDirty, _SpecularTexMtx, _UserViewMtx, _ViewMtx, H_AUTO_OGL, I, NLMISC::CMatrix::identity(), NLMISC::CMatrix::invert(), MaxLight, NLMISC::CVector::Null, NLMISC::CMatrix::setPos(), and NLMISC::CMatrix::setRot().

void NL3D::CDriverGL::setupViewport ( const class CViewport viewport  )  [virtual]

Set the current viewport.

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

Implements NL3D::IDriver.

Definition at line 2198 of file driver_opengl.cpp.

References _CurrViewport, _TextureTarget, _WindowHeight, _WindowWidth, NLMISC::clamp(), dpy, NL3D::CViewport::getValues(), H_AUTO_OGL, and win.

Referenced by setRenderTarget().

void NL3D::CDriverGL::setupWaterPass ( uint  pass  )  [private]
void NL3D::CDriverGL::setupWaterPassARB ( const CMaterial mat  )  [private]

water setup for ARB_fragment_program

Unfortunately, the EXT_vertex_shader extension has to output the fog values in the [0, 1] range to work with the standard pipeline. So we must add a special path for this case, where the fog coordinate is 'unscaled' again. NB : this is fixed in later drivers (from 6.14.10.6343), so check this

Definition at line 2161 of file driver_opengl_material.cpp.

References _ATIFogRangeFixed, _Extensions, _FogEnabled, _FogEnd, _FogStart, activateTexture(), ARBWaterShader, NL3D::CGlExtensions::EXTVertexShader, NL3D::CMaterial::getTexture(), GL_FRAGMENT_PROGRAM_ARB, H_AUTO_OGL, inlGetNumTextStages(), NL3D::ITexture::isBumpMap(), nglBindProgramARB, nglProgramEnvParameter4fARB, NL3D::ITexture::RGBA8888, NLMISC::safe_cast(), NL3D::ITexture::setUploadFormat(), and setupTexture().

Referenced by setupWaterPass().

void NL3D::CDriverGL::setupWaterPassNV20 ( const CMaterial mat  )  [private]
void NL3D::CDriverGL::setupWaterPassR200 ( const CMaterial mat  )  [private]
void NL3D::CDriverGL::setWindowPos ( uint32  x,
uint32  y 
) [virtual]

Set the position of the NeL window.

Implements NL3D::IDriver.

Definition at line 1704 of file driver_opengl.cpp.

References _WindowX, _WindowY, dpy, and win.

void NL3D::CDriverGL::setWindowTitle ( const ucstring title  )  [virtual]

Set the title of the NeL window.

Implements NL3D::IDriver.

Definition at line 1691 of file driver_opengl.cpp.

References ucstring::c_str(), dpy, ucstring::toUtf8(), and win.

void NL3D::CDriverGL::showCursor ( bool  b  )  [virtual]

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

Implements NL3D::IDriver.

Definition at line 2352 of file driver_opengl.cpp.

References cursor, dpy, H_AUTO_OGL, and win.

void NL3D::CDriverGL::showWindow ( bool  show  )  [virtual]

Show or hide the NeL window.

Implements NL3D::IDriver.

Definition at line 1716 of file driver_opengl.cpp.

References dpy, and win.

Referenced by setMode().

bool NL3D::CDriverGL::slowUnlockVertexBufferHard (  )  const [virtual]

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

Implements NL3D::IDriver.

Definition at line 734 of file driver_opengl_vertex.cpp.

References _SlowUnlockVBHard, and H_AUTO_OGL.

void NL3D::CDriverGL::startBench ( bool  wantStandardDeviation = false,
bool  quick = false,
bool  reset = true 
) [virtual]

Implements NL3D::IDriver.

Definition at line 4033 of file driver_opengl.cpp.

void NL3D::CDriverGL::startProfileIBLock (  )  [virtual]

Implements NL3D::IDriver.

Definition at line 3795 of file driver_opengl.cpp.

void NL3D::CDriverGL::startProfileVBHardLock (  )  [virtual]

If the driver support it, enable profile VBHard locks.

No-Op if already profiling

Implements NL3D::IDriver.

Definition at line 3715 of file driver_opengl.cpp.

References _CurVBHardLockCount, _NumVBHardProfileFrame, _VBHardProfiles, and _VBHardProfiling.

void NL3D::CDriverGL::startSpecularBatch (  )  [virtual]

Special for Faster Specular Setup.

Call this between lot of primitives rendered with Specular Materials. Visual Errors may arise if you don't correctly call endSpecularBatch().

Implements NL3D::IDriver.

Definition at line 1121 of file driver_opengl_material.cpp.

References _SpecularBatchOn, H_AUTO_OGL, and setupSpecularBegin().

void NL3D::CDriverGL::stencilFunc ( TStencilFunc  stencilFunc,
int  ref,
uint  mask 
) [virtual]
void NL3D::CDriverGL::stencilMask ( uint  mask  )  [virtual]
void NL3D::CDriverGL::stencilOp ( TStencilOp  fail,
TStencilOp  zfail,
TStencilOp  zpass 
) [virtual]
bool NL3D::CDriverGL::stretchRect ( ITexture srcText,
NLMISC::CRect srcRect,
ITexture destText,
NLMISC::CRect destRect 
) [virtual]

Implements NL3D::IDriver.

Definition at line 474 of file driver_opengl.cpp.

References H_AUTO_OGL.

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 3083 of file driver_opengl.cpp.

References _Extensions, NL3D::CGlExtensions::EXTBlendColor, and H_AUTO_OGL.

bool NL3D::CDriverGL::supportBloomEffect (  )  const [virtual]
bool NL3D::CDriverGL::supportCloudRenderSinglePass (  )  const [virtual]
bool NL3D::CDriverGL::supportEMBM (  )  const [virtual]
bool NL3D::CDriverGL::supportFrameBufferObject (  )  const [virtual]
virtual bool NL3D::CDriverGL::supportIndexOffset (  )  const [inline, virtual]

return true if driver support indices offset.

That is, allow to specify a constant value that is added to each index in current active active index buffer when rendering indexed primitives

Implements NL3D::IDriver.

Definition at line 417 of file driver_opengl.h.

bool NL3D::CDriverGL::supportMADOperator (  )  const [private, virtual]
bool NL3D::CDriverGL::supportOcclusionQuery (  )  const [virtual]

Implements NL3D::IDriver.

Definition at line 4109 of file driver_opengl.cpp.

References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVOcclusionQuery.

bool NL3D::CDriverGL::supportPackedDepthStencil (  )  const [virtual]
bool NL3D::CDriverGL::supportPerPixelLighting ( bool  specular  )  const [virtual]
bool NL3D::CDriverGL::supportTextureRectangle (  )  const [virtual]
bool NL3D::CDriverGL::supportTextureShaders (  )  const [virtual]

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

Implements NL3D::IDriver.

Definition at line 2865 of file driver_opengl.cpp.

References _Extensions, H_AUTO_OGL, and NL3D::CGlExtensions::NVTextureShader.

Referenced by setMatrix2DForTextureOffsetAddrMode().

bool NL3D::CDriverGL::supportVertexBufferHard (  )  const [virtual]

return true if driver support VertexBufferHard.

Implements NL3D::IDriver.

Definition at line 718 of file driver_opengl_vertex.cpp.

References _SupportVBHard, and H_AUTO_OGL.

Referenced by initVertexBufferHard().

bool NL3D::CDriverGL::supportVertexProgramDoubleSidedColor (  )  const [private, virtual]

Check if the driver support double sided colors vertex programs.

Implements NL3D::IDriver.

Definition at line 1888 of file driver_opengl_vertex_program.cpp.

References _Extensions, NL3D::CGlExtensions::ARBVertexProgram, H_AUTO_OGL, and NL3D::CGlExtensions::NVVertexProgram.

bool NL3D::CDriverGL::supportVolatileVertexBuffer (  )  const [virtual]

return true if volatile vertex buffer are supported.

(e.g a vertex buffer which can be created with the flag CVertexBuffer::AGPVolatile or CVertexBuffer::RAMVolatile) If these are not supported, a RAM vb is created instead (transparent to user)

Implements NL3D::IDriver.

Definition at line 725 of file driver_opengl_vertex.cpp.

References H_AUTO_OGL.

bool NL3D::CDriverGL::swapBuffers (  )  [virtual]
void NL3D::CDriverGL::swapTextureHandle ( ITexture tex0,
ITexture tex1 
) [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.

Implements NL3D::IDriver.

Definition at line 1807 of file driver_opengl_texture.cpp.

References activateTexture(), NL3D::CTextureDrvInfosGL::Compressed, NL3D::getTextureGl(), H_AUTO_OGL, NL3D::CTextureDrvInfosGL::ID, inlGetNumTextStages(), NL3D::CTextureDrvInfosGL::MagFilter, NL3D::CTextureDrvInfosGL::MinFilter, NL3D::CTextureDrvInfosGL::MipMap, setupTexture(), NL3D::CTextureDrvInfosGL::TextureMemory, NL3D::CTextureDrvInfosGL::WrapS, and NL3D::CTextureDrvInfosGL::WrapT.

IDriver::TMessageBoxId NL3D::CDriverGL::systemMessageBox ( const char *  message,
const char *  title,
IDriver::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 from NL3D::IDriver.

Definition at line 2154 of file driver_opengl.cpp.

References NL3D::IDriver::abortId, NL3D::IDriver::abortRetryIgnoreType, NL3D::IDriver::asteriskIcon, NL3D::IDriver::cancelId, NL3D::IDriver::errorIcon, NL3D::IDriver::exclamationIcon, H_AUTO_OGL, NL3D::IDriver::handIcon, NL3D::IDriver::ignoreId, NL3D::IDriver::informationIcon, nlstop, NL3D::IDriver::noId, NL3D::IDriver::okCancelType, NL3D::IDriver::okId, NL3D::IDriver::questionIcon, NL3D::IDriver::retryCancelType, NL3D::IDriver::retryId, NL3D::IDriver::stopIcon, NL3D::IDriver::warningIcon, NL3D::IDriver::yesId, NL3D::IDriver::yesNoCancelType, and NL3D::IDriver::yesNoType.

void NL3D::CDriverGL::toggleGlArraysForARBVertexProgram (  )  [private]
void NL3D::CDriverGL::toggleGlArraysForEXTVertexShader (  )  [private]
void NL3D::CDriverGL::toggleGlArraysForNVVertexProgram (  )  [private]
bool NL3D::CDriverGL::uploadTexture ( ITexture tex,
NLMISC::CRect rect,
uint8  nNumMipMap 
) [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); For compressed textures, the rect must aligned on pixel block. (a block of pixel size is 4x4 pixels).

Implements NL3D::IDriver.

Definition at line 1037 of file driver_opengl_texture.cpp.

References _CurrentTexture, _CurrentTextureInfoGL, _DriverGLStates, _Extensions, _ForceTextureResizePower, NL3D::CDriverGLStates::activeTextureARB(), NL3D::ITexture::allowDegradation(), NLMISC::clamp(), NL3D::CGlExtensions::EXTTextureCompressionS3TC, NL3D::getGlSrcTextureComponentType(), NL3D::getGlSrcTextureFormat(), getGlTextureFormat(), NLMISC::CBitmap::getHeight(), NLMISC::CBitmap::getMipMapCount(), NLMISC::CBitmap::getPixelFormat(), NLMISC::CBitmap::getPixels(), NLMISC::CObjectVector< T, EnableObjectBehavior >::getPtr(), NL3D::getTextureGl(), NLMISC::CBitmap::getWidth(), GL_TEXTURE_RECTANGLE_NV, GLenum(), H_AUTO_OGL, NLMISC::CRect::Height, NL3D::CTextureDrvInfosGL::ID, NL3D::ITexture::isTextureCube(), min, NL3D::ITexture::mipMapOn(), nglCompressedTexImage2DARB, nglCompressedTexSubImage2DARB, nlassert, NLMISC::CBitmap::RGBA, NL3D::sameDXTCFormat(), NL3D::CDriverGLStates::setTextureMode(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), NL3D::CDriverGLStates::Texture2D, NL3D::CDriverGLStates::TextureDisabled, NL3D::ITexture::TextureDrvShare, NL3D::CTextureDrvInfosGL::TextureMode, NL3D::CDriverGLStates::TextureRect, NLMISC::CRect::Width, NLMISC::CRect::X, and NLMISC::CRect::Y.

bool NL3D::CDriverGL::uploadTextureCube ( ITexture tex,
NLMISC::CRect rect,
uint8  nNumMipMap,
uint8  nNumFace 
) [virtual]
void NL3D::CDriverGL::verifyNVTextureShaderConfig (  )  [private]

Friends And Related Function Documentation

friend class CTextureDrvInfosGL [friend]

Definition at line 660 of file driver_opengl.h.

Referenced by setupTextureEx().

friend class CVBDrvInfosGL [friend]

Definition at line 1068 of file driver_opengl.h.

Referenced by setupVertexBuffer().

friend class CVertexArrayRangeARB [friend]

Definition at line 1063 of file driver_opengl.h.

friend class CVertexArrayRangeATI [friend]

Definition at line 1062 of file driver_opengl.h.

friend class CVertexArrayRangeMapObjectATI [friend]

Definition at line 1066 of file driver_opengl.h.

friend class CVertexArrayRangeNVidia [friend]

Definition at line 1060 of file driver_opengl.h.

friend class CVertexBufferHardARB [friend]

Definition at line 1064 of file driver_opengl.h.

friend class CVertexBufferHardGLATI [friend]

Definition at line 1065 of file driver_opengl.h.

friend class CVertexBufferHardGLMapObjectATI [friend]

Definition at line 1067 of file driver_opengl.h.

friend class CVertexBufferHardGLNVidia [friend]

Definition at line 1061 of file driver_opengl.h.

friend class CVertexProgamDrvInfosGL [friend]

Member Data Documentation

Definition at line 1274 of file driver_opengl.h.

Referenced by CDriverGL(), and retrieveATIDriverVersion().

Definition at line 1203 of file driver_opengl.h.

Definition at line 1211 of file driver_opengl.h.

Referenced by getBlendConstantColor(), and setBlendConstantColor().

GLfloat NL3D::CDriverGL::_CurrentFogColor[4] [private]

Definition at line 758 of file driver_opengl.h.

Referenced by CDriverGL(), endLightMapMultiPass(), getFogColor(), and setupFog().

Definition at line 846 of file driver_opengl.h.

Referenced by CDriverGL(), and enableGlNormalize().

Definition at line 816 of file driver_opengl.h.

Referenced by beginMultiPass(), CDriverGL(), endMultiPass(), setupMaterial(), and setupPass().

Definition at line 1296 of file driver_opengl.h.

Referenced by CDriverGL(), and deleteOcclusionQuery().

Definition at line 827 of file driver_opengl.h.

Referenced by CDriverGL(), resetTextureShaders(), and setTextureShaders().

Definition at line 764 of file driver_opengl.h.

Referenced by setRenderTarget(), and setupScissor().

Definition at line 763 of file driver_opengl.h.

Referenced by getViewport(), setRenderTarget(), and setupViewport().

Definition at line 716 of file driver_opengl.h.

Referenced by getBitPerPixel(), and setMode().

Definition at line 1227 of file driver_opengl.h.

Referenced by setupEXTVertexShader().

Definition at line 1230 of file driver_opengl.h.

Referenced by setConstant(), setConstantMatrix(), and setupEXTVertexShader().

Definition at line 1226 of file driver_opengl.h.

Referenced by setupEXTVertexShader().

const uint NL3D::CDriverGL::_EVSNumConstant = 97 [static, private]

Definition at line 1232 of file driver_opengl.h.

Referenced by setupEXTVertexShader(), and setupFog().

Definition at line 1225 of file driver_opengl.h.

Referenced by setupEXTVertexShader().

GLuint NL3D::CDriverGL::_EVSTexHandle[8] [private]

Definition at line 1228 of file driver_opengl.h.

Referenced by setupEXTVertexShader().

Definition at line 711 of file driver_opengl.h.

Referenced by activateTexture(), activeVertexProgram(), beginSpecularMultiPass(), checkForPerPixelLightingSupport(), computeLightMapInfos(), createOcclusionQuery(), NL3D::CVertexProgamDrvInfosGL::CVertexProgamDrvInfosGL(), NL3D::CVertexArrayRangeNVidia::disable(), disableHardwareTextureShader(), disableHardwareVertexArrayAGP(), disableHardwareVertexProgram(), NL3D::CVertexArrayRangeNVidia::enable(), enableLight(), enableVertexProgramDoubleSidedColor(), endWaterMultiPass(), forceActivateTexEnvMode(), getGlTextureFormat(), getSwapVBLInterval(), initEMBM(), initFragmentShaders(), inlGetNumTextStages(), isTextureAddrModeSupported(), isVertexProgramEmulated(), isVertexProgramSupported(), isWaterShaderSupported(), resetTextureShaders(), setBlendConstantColor(), setConstant(), setConstantMatrix(), setEMBMMatrix(), setLightInternal(), setSwapVBLInterval(), setupCloudPass(), setupFog(), setupGlArrays(), setupLightMapPass(), setupMaterial(), setupPPLNoSpecPass(), setupPPLPass(), setupSpecularPass(), setupTextureBasicParameters(), setupTextureEx(), setupVertexBuffer(), setupWaterPass(), setupWaterPassARB(), supportBlendConstantColor(), supportCloudRenderSinglePass(), supportEMBM(), supportFrameBufferObject(), supportMADOperator(), supportOcclusionQuery(), supportPackedDepthStencil(), supportTextureRectangle(), supportTextureShaders(), supportVertexProgramDoubleSidedColor(), swapBuffers(), toggleGlArraysForARBVertexProgram(), and uploadTexture().

Definition at line 757 of file driver_opengl.h.

Referenced by CDriverGL(), getFogEnd(), setupFog(), and setupWaterPassARB().

Definition at line 757 of file driver_opengl.h.

Referenced by CDriverGL(), getFogStart(), setupFog(), and setupWaterPassARB().

Definition at line 1181 of file driver_opengl.h.

Referenced by CDriverGL(), forceDXTCCompression(), and getGlTextureFormat().

Definition at line 1185 of file driver_opengl.h.

Referenced by CDriverGL(), forceNativeFragmentPrograms(), and initFragmentShaders().

Definition at line 719 of file driver_opengl.h.

Referenced by CDriverGL(), doRefreshRenderSetup(), forceNormalize(), and isForceNormalize().

Divisor for textureResize (power).

Definition at line 1183 of file driver_opengl.h.

Referenced by CDriverGL(), forceTextureResize(), setupTextureEx(), and uploadTexture().

Definition at line 668 of file driver_opengl.h.

Referenced by CDriverGL(), getCurrentScreenMode(), release(), and setMode().

Definition at line 731 of file driver_opengl.h.

Referenced by refreshProjMatrixFromGL(), and setConstantMatrix().

Definition at line 706 of file driver_opengl.h.

Referenced by CDriverGL(), getVideocardInformation(), release(), and setSwapVBLInterval().

Definition at line 670 of file driver_opengl.h.

Referenced by CDriverGL(), getSwapVBLInterval(), and setSwapVBLInterval().

bool NL3D::CDriverGL::_LightDirty[MaxLight] [private]

Definition at line 780 of file driver_opengl.h.

Referenced by setLightMapDynamicLight(), and setupLightMapDynamicLighting().

Definition at line 946 of file driver_opengl.h.

Referenced by CDriverGL(), and setupLightMapPass().

std::vector<uint> NL3D::CDriverGL::_LightMapLUT [private]

Definition at line 943 of file driver_opengl.h.

Referenced by CDriverGL(), computeLightMapInfos(), and setupLightMapPass().

Definition at line 941 of file driver_opengl.h.

Referenced by computeLightMapInfos(), and setupLightMapPass().

Definition at line 950 of file driver_opengl.h.

Referenced by CDriverGL(), resetLightMapVertexSetup(), and setupLightMapPass().

uint NL3D::CDriverGL::_LightMode[MaxLight] [private]

Definition at line 775 of file driver_opengl.h.

Referenced by cleanLightSetup(), and setLightInternal().

Definition at line 842 of file driver_opengl.h.

Referenced by CDriverGL(), and setupMaterial().

Definition at line 1102 of file driver_opengl.h.

Referenced by profileSetupedMaterials(), setupMaterial(), and swapBuffers().

Definition at line 1103 of file driver_opengl.h.

Referenced by profileSetupedModelMatrix(), setupModelMatrix(), and swapBuffers().

Definition at line 939 of file driver_opengl.h.

Referenced by computeLightMapInfos(), endLightMapMultiPass(), and setupLightMapPass().

Temp Variables computed in beginLightMapMultiPass(). Reused in setupLightMapPass().

Definition at line 938 of file driver_opengl.h.

Referenced by computeLightMapInfos(), endLightMapMultiPass(), and setupLightMapPass().

Definition at line 1075 of file driver_opengl.h.

Referenced by CDriverGL(), and NL3D::CVertexArrayRangeNVidia::enable().

Definition at line 1076 of file driver_opengl.h.

Referenced by CDriverGL(), and NL3D::CVertexArrayRangeNVidia::enable().

Definition at line 1295 of file driver_opengl.h.

Referenced by createOcclusionQuery(), deleteOcclusionQuery(), and release().

Definition at line 669 of file driver_opengl.h.

Referenced by CDriverGL(), getWindowPos(), getWindowSize(), and release().

Definition at line 767 of file driver_opengl.h.

Referenced by setRenderTarget().

Definition at line 737 of file driver_opengl.h.

Referenced by setFrustum(), and setupMaterial().

Definition at line 1271 of file driver_opengl.h.

Referenced by CDriverGL(), enablePolygonSmoothing(), and isPolygonSmoothingEnabled().

Definition at line 792 of file driver_opengl.h.

Referenced by setPerPixelLightingLight().

Definition at line 793 of file driver_opengl.h.

Referenced by setPerPixelLightingLight(), setupPPLNoSpecPass(), and setupPPLPass().

Definition at line 794 of file driver_opengl.h.

Referenced by setPerPixelLightingLight(), and setupPPLPass().

Definition at line 728 of file driver_opengl.h.

Referenced by CDriverGL(), refreshProjMatrixFromGL(), and setFrustum().

Definition at line 769 of file driver_opengl.h.

Referenced by CDriverGL(), and setRenderTarget().

Definition at line 1080 of file driver_opengl.h.

Referenced by CDriverGL(), and slowUnlockVertexBufferHard().

Definition at line 745 of file driver_opengl.h.

Referenced by setupSpecularBegin(), setupViewMatrix(), and setupViewMatrixEx().

Definition at line 989 of file driver_opengl.h.

Referenced by getSpecularCubeMap().

Definition at line 837 of file driver_opengl.h.

Referenced by CDriverGL(), initEMBM(), and isEMBMSupportedAtStage().

Definition at line 1104 of file driver_opengl.h.

Referenced by activateTexture(), CDriverGL(), and enableUsedTextureMemorySum().

Definition at line 1079 of file driver_opengl.h.

Referenced by CDriverGL(), and supportVertexBufferHard().

Definition at line 1300 of file driver_opengl.h.

Referenced by CDriverGL(), getSwapBufferCounter(), release(), and swapBuffers().

Definition at line 1293 of file driver_opengl.h.

Referenced by activateTexture(), and CDriverGL().

Definition at line 1288 of file driver_opengl.h.

Referenced by CDriverGL(), and setRenderTarget().

Definition at line 1286 of file driver_opengl.h.

Referenced by setRenderTarget().

Definition at line 1282 of file driver_opengl.h.

Referenced by setRenderTarget().

Definition at line 1287 of file driver_opengl.h.

Referenced by CDriverGL(), copyTargetToTexture(), and setRenderTarget().

Definition at line 1285 of file driver_opengl.h.

Referenced by setRenderTarget().

Definition at line 1283 of file driver_opengl.h.

Referenced by setRenderTarget().

Definition at line 1284 of file driver_opengl.h.

Referenced by setRenderTarget().

Definition at line 784 of file driver_opengl.h.

Referenced by CDriverGL(), setLight(), and setupLightMapDynamicLighting().

Definition at line 785 of file driver_opengl.h.

Referenced by enableLight(), and setupLightMapDynamicLighting().

Definition at line 1189 of file driver_opengl.h.

Definition at line 1190 of file driver_opengl.h.

Referenced by CDriverGL(), disableUserTextureMatrix(), and setupUserTextureMatrix().

Definition at line 740 of file driver_opengl.h.

Referenced by getViewMatrix(), setupViewMatrix(), and setupViewMatrixEx().

Definition at line 672 of file driver_opengl.h.

Referenced by getWindowPos(), setMode(), and setWindowPos().

Definition at line 672 of file driver_opengl.h.

Referenced by getWindowPos(), setMode(), and setWindowPos().

Definition at line 1299 of file driver_opengl.h.

Referenced by CDriverGL(), isWndActive(), and swapBuffers().

Definition at line 777 of file driver_opengl.h.

Referenced by cleanLightSetup(), and setLightInternal().

Definition at line 776 of file driver_opengl.h.

Referenced by cleanLightSetup(), and setLightInternal().

GLuint NL3D::CDriverGL::ARBWaterShader[4] [private]
GLXContext NL3D::CDriverGL::ctx [private]

Definition at line 693 of file driver_opengl.h.

Referenced by activate(), and release().

Cursor NL3D::CDriverGL::cursor [private]

Definition at line 695 of file driver_opengl.h.

Referenced by CDriverGL(), and showCursor().

Display* NL3D::CDriverGL::dpy [private]
const uint NL3D::CDriverGL::GLMatrix [static, private]
Initial value:
{
    GL_MODELVIEW,
    GL_PROJECTION,
    GL_MODELVIEW_PROJECTION_NV
}

Definition at line 1198 of file driver_opengl.h.

Referenced by setConstantMatrix().

const uint NL3D::CDriverGL::GLTransform [static, private]
Initial value:

Definition at line 1199 of file driver_opengl.h.

Referenced by setConstantMatrix().

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 1195 of file driver_opengl.h.

Referenced by setupGlArraysForARBVertexProgram(), setupGlArraysForEXTVertexShader(), and setupGlArraysForNVVertexProgram().

const bool NL3D::CDriverGL::GLTypeIsIntegral [static, private]
Initial value:
{
    false,  
    false,  
    true,   
    false,  
    false,  
    true,   
    false,  
    false,  
    true,   
    false,  
    false,  
    true,   
    true    
}

Definition at line 1197 of file driver_opengl.h.

Referenced by setupGlArraysForARBVertexProgram().

const