Changed: #878 Fix typos in comments/code

This commit is contained in:
kervala 2010-06-07 15:40:29 +02:00
parent c59af80faa
commit 13435926e7

View file

@ -264,7 +264,6 @@ static Bool WndProc(Display *d, XEvent *e, char *arg)
*/ */
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] = GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] =
{ {
GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,
@ -279,9 +278,9 @@ GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] =
CDriverGL::CDriverGL() CDriverGL::CDriverGL()
{ {
H_AUTO_OGL(CDriverGL_CDriverGL) H_AUTO_OGL(CDriverGL_CDriverGL)
_OffScreen = false;
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
_PBuffer = NULL; _PBuffer = NULL;
_hWnd = NULL; _hWnd = NULL;
_hRC = NULL; _hRC = NULL;
@ -290,10 +289,13 @@ CDriverGL::CDriverGL()
_Interval = 1; _Interval = 1;
#elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE) #elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE)
NL3D::MAC::ctor(); NL3D::MAC::ctor();
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
cursor = None; cursor = None;
_win = 0;
_dpy = 0;
# ifdef XF86VIDMODE # ifdef XF86VIDMODE
// zero the old screen mode // zero the old screen mode
@ -302,7 +304,8 @@ CDriverGL::CDriverGL()
# endif //XF86VIDMODE # endif //XF86VIDMODE
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
_FullScreen= false; _OffScreen = false;
_FullScreen = false;
_CurrentMaterial=NULL; _CurrentMaterial=NULL;
_Initialized = false; _Initialized = false;
@ -347,7 +350,6 @@ CDriverGL::CDriverGL()
_NVTextureShaderEnabled = false; _NVTextureShaderEnabled = false;
// Compute the Flag which say if one texture has been changed in CMaterial. // Compute the Flag which say if one texture has been changed in CMaterial.
_MaterialAllTextureTouchedFlag= 0; _MaterialAllTextureTouchedFlag= 0;
for(i=0; i < IDRV_MAT_MAXTEXTURES; i++) for(i=0; i < IDRV_MAT_MAXTEXTURES; i++)
@ -356,7 +358,6 @@ CDriverGL::CDriverGL()
_CurrentTexAddrMode[i] = GL_NONE; _CurrentTexAddrMode[i] = GL_NONE;
} }
_UserTexMatEnabled = 0; _UserTexMatEnabled = 0;
// Ligtmap preca. // Ligtmap preca.
@ -415,7 +416,6 @@ CDriverGL::CDriverGL()
_TextureTargetUpload = false; _TextureTargetUpload = false;
} }
// *************************************************************************** // ***************************************************************************
CDriverGL::~CDriverGL() CDriverGL::~CDriverGL()
{ {
@ -502,21 +502,18 @@ bool CDriverGL::stretchRect(ITexture * /* srcText */, NLMISC::CRect &/* srcRect
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::supportBloomEffect() const bool CDriverGL::supportBloomEffect() const
{ {
return (isVertexProgramSupported() && supportFrameBufferObject() && supportPackedDepthStencil() && supportTextureRectangle()); return (isVertexProgramSupported() && supportFrameBufferObject() && supportPackedDepthStencil() && supportTextureRectangle());
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::supportNonPowerOfTwoTextures() const bool CDriverGL::supportNonPowerOfTwoTextures() const
{ {
return _Extensions.ARBTextureNonPowerOfTwo; return _Extensions.ARBTextureNonPowerOfTwo;
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::isTextureRectangle(ITexture * tex) const bool CDriverGL::isTextureRectangle(ITexture * tex) const
{ {
return (supportTextureRectangle() && tex->isBloomTexture() && tex->mipMapOff() return (supportTextureRectangle() && tex->isBloomTexture() && tex->mipMapOff()
@ -524,7 +521,6 @@ bool CDriverGL::isTextureRectangle(ITexture * tex) const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::activeFrameBufferObject(ITexture * tex) bool CDriverGL::activeFrameBufferObject(ITexture * tex)
{ {
if(supportFrameBufferObject()/* && supportPackedDepthStencil()*/) if(supportFrameBufferObject()/* && supportPackedDepthStencil()*/)
@ -545,7 +541,6 @@ bool CDriverGL::activeFrameBufferObject(ITexture * tex)
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::disableHardwareVertexProgram() void CDriverGL::disableHardwareVertexProgram()
{ {
H_AUTO_OGL(CDriverGL_disableHardwareVertexProgram) H_AUTO_OGL(CDriverGL_disableHardwareVertexProgram)
@ -565,7 +560,6 @@ void CDriverGL::disableHardwareTextureShader()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable) throw(EBadDisplay) bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable) throw(EBadDisplay)
{ {
H_AUTO_OGL(CDriverGL_setDisplay) H_AUTO_OGL(CDriverGL_setDisplay)
@ -677,8 +671,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
return false; return false;
} }
// Make the context current // Make the context current
if (!wglMakeCurrent(tempHDC,tempGLRC)) if (!wglMakeCurrent(tempHDC,tempGLRC))
{ {
@ -1190,7 +1182,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
nlwarning("Missing Important GL extension: GL_EXT_texture_env_combine => All envcombine are setup to GL_MODULATE!!!"); nlwarning("Missing Important GL extension: GL_EXT_texture_env_combine => All envcombine are setup to GL_MODULATE!!!");
} }
// Get num of light for this driver // Get num of light for this driver
int numLight; int numLight;
glGetIntegerv (GL_MAX_LIGHTS, &numLight); glGetIntegerv (GL_MAX_LIGHTS, &numLight);
@ -1206,7 +1197,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
// init _DriverGLStates // init _DriverGLStates
_DriverGLStates.init(_Extensions.ARBTextureCubeMap, (_Extensions.NVTextureRectangle || _Extensions.EXTTextureRectangle || _Extensions.ARBTextureRectangle), _MaxDriverLight); _DriverGLStates.init(_Extensions.ARBTextureCubeMap, (_Extensions.NVTextureRectangle || _Extensions.EXTTextureRectangle || _Extensions.ARBTextureRectangle), _MaxDriverLight);
// Init OpenGL/Driver defaults. // Init OpenGL/Driver defaults.
//============================= //=============================
glViewport(0,0,width,height); glViewport(0,0,width,height);
@ -1248,7 +1238,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
_VertexProgramEnabled= false; _VertexProgramEnabled= false;
_LastSetupGLArrayVertexProgram= false; _LastSetupGLArrayVertexProgram= false;
// Init VertexArrayRange according to supported extenstion. // Init VertexArrayRange according to supported extenstion.
_SupportVBHard= false; _SupportVBHard= false;
_SlowUnlockVBHard= false; _SlowUnlockVBHard= false;
@ -1297,7 +1286,8 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
_CurrentVertexBufferHard= NULL; _CurrentVertexBufferHard= NULL;
_NVCurrentVARPtr= NULL; _NVCurrentVARPtr= NULL;
_NVCurrentVARSize= 0; _NVCurrentVARSize= 0;
if(_SupportVBHard)
if (_SupportVBHard)
{ {
// try to allocate 16Mo by default of AGP Ram. // try to allocate 16Mo by default of AGP Ram.
initVertexBufferHard(NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, 0); initVertexBufferHard(NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, 0);
@ -1329,8 +1319,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
//=========================================================== //===========================================================
initFragmentShaders(); initFragmentShaders();
// Activate the default texture environnments for all stages. // Activate the default texture environnments for all stages.
//=========================================================== //===========================================================
for(uint stage=0;stage<inlGetNumTextStages(); stage++) for(uint stage=0;stage<inlGetNumTextStages(); stage++)
@ -1365,8 +1353,8 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
glTexGenfv(GL_Q, GL_OBJECT_PLANE, params); glTexGenfv(GL_Q, GL_OBJECT_PLANE, params);
glTexGenfv(GL_Q, GL_EYE_PLANE, params); glTexGenfv(GL_Q, GL_EYE_PLANE, params);
} }
resetTextureShaders();
resetTextureShaders();
_PPLExponent = 1.f; _PPLExponent = 1.f;
_PPLightDiffuseColor = NLMISC::CRGBA::White; _PPLightDiffuseColor = NLMISC::CRGBA::White;
@ -1839,30 +1827,26 @@ void CDriverGL::resetTextureShaders()
{ {
glEnable(GL_TEXTURE_SHADER_NV); glEnable(GL_TEXTURE_SHADER_NV);
for (uint stage = 0; stage < inlGetNumTextStages(); ++stage) for (uint stage = 0; stage < inlGetNumTextStages(); ++stage)
{ {
_DriverGLStates.activeTextureARB(stage); _DriverGLStates.activeTextureARB(stage);
if (stage != 0) if (stage != 0)
{ {
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + stage - 1); glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + stage - 1);
} }
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
_CurrentTexAddrMode[stage] = GL_NONE; _CurrentTexAddrMode[stage] = GL_NONE;
} }
glDisable(GL_TEXTURE_SHADER_NV);
glDisable(GL_TEXTURE_SHADER_NV);
_NVTextureShaderEnabled = false; _NVTextureShaderEnabled = false;
} }
} }
// -------------------------------------------------- // --------------------------------------------------
emptyProc CDriverGL::getWindowProc() emptyProc CDriverGL::getWindowProc()
{ {
H_AUTO_OGL(CDriverGL_getWindowProc) H_AUTO_OGL(CDriverGL_getWindowProc)
@ -1874,7 +1858,6 @@ emptyProc CDriverGL::getWindowProc()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::activate() bool CDriverGL::activate()
{ {
H_AUTO_OGL(CDriverGL_activate) H_AUTO_OGL(CDriverGL_activate)
@ -1903,7 +1886,6 @@ bool CDriverGL::activate()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::isTextureExist(const ITexture&tex) bool CDriverGL::isTextureExist(const ITexture&tex)
{ {
H_AUTO_OGL(CDriverGL_isTextureExist) H_AUTO_OGL(CDriverGL_isTextureExist)
@ -1922,7 +1904,6 @@ bool CDriverGL::isTextureExist(const ITexture&tex)
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::clear2D(CRGBA rgba) bool CDriverGL::clear2D(CRGBA rgba)
{ {
H_AUTO_OGL(CDriverGL_clear2D) H_AUTO_OGL(CDriverGL_clear2D)
@ -1934,7 +1915,6 @@ bool CDriverGL::clear2D(CRGBA rgba)
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::clearZBuffer(float zval) bool CDriverGL::clearZBuffer(float zval)
{ {
H_AUTO_OGL(CDriverGL_clearZBuffer) H_AUTO_OGL(CDriverGL_clearZBuffer)
@ -1947,7 +1927,6 @@ bool CDriverGL::clearZBuffer(float zval)
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::clearStencilBuffer(float stencilval) bool CDriverGL::clearStencilBuffer(float stencilval)
{ {
H_AUTO_OGL(CDriverGL_clearStencilBuffer) H_AUTO_OGL(CDriverGL_clearStencilBuffer)
@ -1959,7 +1938,6 @@ bool CDriverGL::clearStencilBuffer(float stencilval)
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha) void CDriverGL::setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha)
{ {
H_AUTO_OGL(CDriverGL_setColorMask ) H_AUTO_OGL(CDriverGL_setColorMask )
@ -1970,6 +1948,7 @@ void CDriverGL::setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha)
bool CDriverGL::swapBuffers() bool CDriverGL::swapBuffers()
{ {
H_AUTO_OGL(CDriverGL_swapBuffers) H_AUTO_OGL(CDriverGL_swapBuffers)
++ _SwapBufferCounter; ++ _SwapBufferCounter;
// Reset texture shaders // Reset texture shaders
//resetTextureShaders(); //resetTextureShaders();
@ -2115,7 +2094,6 @@ bool CDriverGL::swapBuffers()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::release() bool CDriverGL::release()
{ {
H_AUTO_OGL(CDriverGL_release) H_AUTO_OGL(CDriverGL_release)
@ -2236,7 +2214,6 @@ bool CDriverGL::release()
} }
// -------------------------------------------------- // --------------------------------------------------
IDriver::TMessageBoxId CDriverGL::systemMessageBox (const char* message, const char* title, IDriver::TMessageBoxType type, TMessageBoxIcon icon) IDriver::TMessageBoxId CDriverGL::systemMessageBox (const char* message, const char* title, IDriver::TMessageBoxType type, TMessageBoxIcon icon)
{ {
H_AUTO_OGL(CDriverGL_systemMessageBox) H_AUTO_OGL(CDriverGL_systemMessageBox)
@ -2280,7 +2257,6 @@ IDriver::TMessageBoxId CDriverGL::systemMessageBox (const char* message, const c
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setupViewport (const class CViewport& viewport) void CDriverGL::setupViewport (const class CViewport& viewport)
{ {
H_AUTO_OGL(CDriverGL_setupViewport ) H_AUTO_OGL(CDriverGL_setupViewport )
@ -2343,9 +2319,6 @@ void CDriverGL::setupViewport (const class CViewport& viewport)
int iheight=(int)((float)clientHeight*height+0.5f); int iheight=(int)((float)clientHeight*height+0.5f);
clamp (iheight, 0, clientHeight-iy); clamp (iheight, 0, clientHeight-iy);
glViewport (ix, iy, iwidth, iheight); glViewport (ix, iy, iwidth, iheight);
} }
// -------------------------------------------------- // --------------------------------------------------
@ -2355,8 +2328,6 @@ void CDriverGL::getViewport(CViewport &viewport)
viewport = _CurrViewport; viewport = _CurrViewport;
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setupScissor (const class CScissor& scissor) void CDriverGL::setupScissor (const class CScissor& scissor)
{ {
@ -2443,10 +2414,7 @@ void CDriverGL::setupScissor (const class CScissor& scissor)
} }
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::showCursor(bool b) void CDriverGL::showCursor(bool b)
{ {
H_AUTO_OGL(CDriverGL_showCursor) H_AUTO_OGL(CDriverGL_showCursor)
@ -2495,7 +2463,6 @@ void CDriverGL::showCursor(bool b)
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setMousePos(float x, float y) void CDriverGL::setMousePos(float x, float y)
{ {
H_AUTO_OGL(CDriverGL_setMousePos) H_AUTO_OGL(CDriverGL_setMousePos)
@ -2585,10 +2552,7 @@ void CDriverGL::getWindowPos(uint32 &x, uint32 &y)
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::isActive() bool CDriverGL::isActive()
{ {
H_AUTO_OGL(CDriverGL_isActive) H_AUTO_OGL(CDriverGL_isActive)
@ -2621,13 +2585,10 @@ const char *CDriverGL::getVideocardInformation ()
const char *renderer = (const char *) glGetString (GL_RENDERER); const char *renderer = (const char *) glGetString (GL_RENDERER);
const char *version = (const char *) glGetString (GL_VERSION); const char *version = (const char *) glGetString (GL_VERSION);
smprintf(name, 1024, "OpenGL / %s / %s / %s", vendor, renderer, version); smprintf(name, 1024, "OpenGL / %s / %s / %s", vendor, renderer, version);
return name; return name;
} }
void CDriverGL::setCapture (bool b) void CDriverGL::setCapture (bool b)
{ {
H_AUTO_OGL(CDriverGL_setCapture ) H_AUTO_OGL(CDriverGL_setCapture )
@ -2703,8 +2664,6 @@ bool CDriverGL::clipRect(NLMISC::CRect &rect)
return rect.Width>0 && rect.Height>0; return rect.Width>0 && rect.Height>0;
} }
void CDriverGL::getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect) void CDriverGL::getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect)
{ {
H_AUTO_OGL(CDriverGL_getBufferPart ) H_AUTO_OGL(CDriverGL_getBufferPart )
@ -2763,9 +2722,6 @@ bool CDriverGL::fillBuffer (CBitmap &bitmap)
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::copyFrameBufferToTexture(ITexture *tex, void CDriverGL::copyFrameBufferToTexture(ITexture *tex,
uint32 level, uint32 level,
uint32 offsetx, uint32 offsetx,
@ -2811,7 +2767,7 @@ void CDriverGL::copyFrameBufferToTexture(ITexture *tex,
// gltext->activeFrameBufferObject(tex); // gltext->activeFrameBufferObject(tex);
} }
// ***************************************************************************
void CDriverGL::setPolygonMode (TPolygonMode mode) void CDriverGL::setPolygonMode (TPolygonMode mode)
{ {
H_AUTO_OGL(CDriverGL_setPolygonMode ) H_AUTO_OGL(CDriverGL_setPolygonMode )
@ -2832,13 +2788,14 @@ void CDriverGL::setPolygonMode (TPolygonMode mode)
} }
} }
// ***************************************************************************
bool CDriverGL::fogEnabled() bool CDriverGL::fogEnabled()
{ {
H_AUTO_OGL(CDriverGL_fogEnabled) H_AUTO_OGL(CDriverGL_fogEnabled)
return _FogEnabled; return _FogEnabled;
} }
// ***************************************************************************
void CDriverGL::enableFog(bool enable) void CDriverGL::enableFog(bool enable)
{ {
H_AUTO_OGL(CDriverGL_enableFog) H_AUTO_OGL(CDriverGL_enableFog)
@ -2846,6 +2803,7 @@ void CDriverGL::enableFog(bool enable)
_FogEnabled= enable; _FogEnabled= enable;
} }
// ***************************************************************************
void CDriverGL::setupFog(float start, float end, CRGBA color) void CDriverGL::setupFog(float start, float end, CRGBA color)
{ {
H_AUTO_OGL(CDriverGL_setupFog) H_AUTO_OGL(CDriverGL_setupFog)
@ -2881,7 +2839,6 @@ void CDriverGL::setupFog(float start, float end, CRGBA color)
_FogEnd = end; _FogEnd = end;
} }
// *************************************************************************** // ***************************************************************************
float CDriverGL::getFogStart() const float CDriverGL::getFogStart() const
{ {
@ -3091,7 +3048,7 @@ void CDriverGL::setPerPixelLightingLight(CRGBA diffuse, CRGBA specular, float sh
} }
// *************************************************************************** // ***************************************************************************
NLMISC::IMouseDevice *CDriverGL::enableLowLevelMouse(bool enable, bool exclusive) NLMISC::IMouseDevice* CDriverGL::enableLowLevelMouse(bool enable, bool exclusive)
{ {
H_AUTO_OGL(CDriverGL_enableLowLevelMouse) H_AUTO_OGL(CDriverGL_enableLowLevelMouse)
@ -3126,7 +3083,7 @@ NLMISC::IMouseDevice *CDriverGL::enableLowLevelMouse(bool enable, bool exclusive
} }
// *************************************************************************** // ***************************************************************************
NLMISC::IKeyboardDevice *CDriverGL::enableLowLevelKeyboard(bool enable) NLMISC::IKeyboardDevice* CDriverGL::enableLowLevelKeyboard(bool enable)
{ {
H_AUTO_OGL(CDriverGL_enableLowLevelKeyboard) H_AUTO_OGL(CDriverGL_enableLowLevelKeyboard)
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -3160,7 +3117,7 @@ NLMISC::IKeyboardDevice *CDriverGL::enableLowLevelKeyboard(bool enable)
} }
// *************************************************************************** // ***************************************************************************
NLMISC::IInputDeviceManager *CDriverGL::getLowLevelInputDeviceManager() NLMISC::IInputDeviceManager* CDriverGL::getLowLevelInputDeviceManager()
{ {
H_AUTO_OGL(CDriverGL_getLowLevelInputDeviceManager) H_AUTO_OGL(CDriverGL_getLowLevelInputDeviceManager)
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -3252,7 +3209,6 @@ uint CDriverGL::getNbTextureStages() const
return inlGetNumTextStages(); return inlGetNumTextStages();
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::refreshProjMatrixFromGL() void CDriverGL::refreshProjMatrixFromGL()
{ {
@ -3419,9 +3375,6 @@ void CDriverGL::initEMBM()
} }
} }
// *************************************************************************** // ***************************************************************************
/** Water fragment program with extension ARB_fragment_program /** Water fragment program with extension ARB_fragment_program
*/ */
@ -3483,8 +3436,6 @@ MAD_SAT tmpFog, fogValue.x, fogFactor.x, fogFactor.y; \n\
LRP oCol, tmpFog.x, envMap, fogColor; \n\ LRP oCol, tmpFog.x, envMap, fogColor; \n\
END "; END ";
// ************************************************************************************** // **************************************************************************************
/** Water fragment program with extension ARB_fragment_program and a diffuse map applied /** Water fragment program with extension ARB_fragment_program and a diffuse map applied
*/ */
@ -3556,7 +3507,6 @@ MUL diffuse, diffuse, envMap; \n\
LRP oCol, tmpFog.x, diffuse, fogColor; \n\ LRP oCol, tmpFog.x, diffuse, fogColor; \n\
END "; END ";
// *************************************************************************** // ***************************************************************************
/** Load a ARB_fragment_program_code, and ensure it is loaded natively /** Load a ARB_fragment_program_code, and ensure it is loaded natively
*/ */
@ -3595,7 +3545,6 @@ uint loadARBFragmentProgramStringNative(const char *prog, bool forceNativeProgra
return 0; return 0;
} }
// *************************************************************************** // ***************************************************************************
/** R200 Fragment Shader : /** R200 Fragment Shader :
* Send fragment shader to fetch a perturbed envmap from the addition of 2 bumpmap * Send fragment shader to fetch a perturbed envmap from the addition of 2 bumpmap
@ -3627,6 +3576,7 @@ void CDriverGL::forceNativeFragmentPrograms(bool nativeOnly)
_ForceNativeFragmentPrograms = nativeOnly; _ForceNativeFragmentPrograms = nativeOnly;
} }
// ***************************************************************************
void CDriverGL::initFragmentShaders() void CDriverGL::initFragmentShaders()
{ {
H_AUTO_OGL(CDriverGL_initFragmentShaders) H_AUTO_OGL(CDriverGL_initFragmentShaders)
@ -3781,7 +3731,6 @@ void CDriverGL::deleteFragmentShaders()
} }
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::finish() void CDriverGL::finish()
{ {
@ -4095,7 +4044,6 @@ void CDriverGL::retrieveATIDriverVersion()
#endif #endif
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::supportMADOperator() const bool CDriverGL::supportMADOperator() const
{ {
@ -4104,7 +4052,6 @@ bool CDriverGL::supportMADOperator() const
return _Extensions.NVTextureEnvCombine4 || _Extensions.ATITextureEnvCombine3; return _Extensions.NVTextureEnvCombine4 || _Extensions.ATITextureEnvCombine3;
} }
// *************************************************************************** // ***************************************************************************
uint CDriverGL::getNumAdapter() const uint CDriverGL::getNumAdapter() const
{ {
@ -4114,7 +4061,6 @@ uint CDriverGL::getNumAdapter() const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::getAdapter(uint adapter, CAdapter &desc) const bool CDriverGL::getAdapter(uint adapter, CAdapter &desc) const
{ {
H_AUTO_OGL(CDriverGL_getAdapter) H_AUTO_OGL(CDriverGL_getAdapter)
@ -4137,7 +4083,6 @@ bool CDriverGL::getAdapter(uint adapter, CAdapter &desc) const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::setAdapter(uint adapter) bool CDriverGL::setAdapter(uint adapter)
{ {
H_AUTO_OGL(CDriverGL_setAdapter) H_AUTO_OGL(CDriverGL_setAdapter)
@ -4146,7 +4091,6 @@ bool CDriverGL::setAdapter(uint adapter)
} }
// *************************************************************************** // ***************************************************************************
CVertexBuffer::TVertexColorType CDriverGL::getVertexColorFormat() const CVertexBuffer::TVertexColorType CDriverGL::getVertexColorFormat() const
{ {
H_AUTO_OGL(CDriverGL_CDriverGL) H_AUTO_OGL(CDriverGL_CDriverGL)
@ -4155,7 +4099,6 @@ CVertexBuffer::TVertexColorType CDriverGL::getVertexColorFormat() const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::activeShader(CShader * /* shd */) bool CDriverGL::activeShader(CShader * /* shd */)
{ {
H_AUTO_OGL(CDriverGL_activeShader) H_AUTO_OGL(CDriverGL_activeShader)
@ -4164,21 +4107,18 @@ bool CDriverGL::activeShader(CShader * /* shd */)
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::startBench (bool wantStandardDeviation, bool quick, bool reset) void CDriverGL::startBench (bool wantStandardDeviation, bool quick, bool reset)
{ {
CHTimer::startBench (wantStandardDeviation, quick, reset); CHTimer::startBench (wantStandardDeviation, quick, reset);
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::endBench () void CDriverGL::endBench ()
{ {
CHTimer::endBench (); CHTimer::endBench ();
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::displayBench (class NLMISC::CLog *log) void CDriverGL::displayBench (class NLMISC::CLog *log)
{ {
// diplay // diplay
@ -4360,7 +4300,6 @@ uint COcclusionQueryGL::getVisibleCount()
return VisibleCount; return VisibleCount;
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::setDepthRange(float znear, float zfar) void CDriverGL::setDepthRange(float znear, float zfar)
{ {
@ -4466,12 +4405,10 @@ void CDriverGL::stencilOp(TStencilOp fail, TStencilOp zfail, TStencilOp zpass)
default: nlstop; default: nlstop;
} }
_DriverGLStates.stencilOp(glFail, glZFail, glZPass); _DriverGLStates.stencilOp(glFail, glZFail, glZPass);
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::stencilMask(uint mask) void CDriverGL::stencilMask(uint mask)
{ {
H_AUTO_OGL(CDriverGL_CDriverGL) H_AUTO_OGL(CDriverGL_CDriverGL)
@ -4498,6 +4435,7 @@ void CDriverGL::endDialogMode()
} // NL3D } // NL3D
// ***************************************************************************
void displayGLError(GLenum error) void displayGLError(GLenum error)
{ {
switch(error) switch(error)