mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 07:36:16 +00:00
Fixed: OpenGL ES driver compilation
This commit is contained in:
parent
26370c962d
commit
4f1897208c
2 changed files with 20 additions and 2 deletions
|
@ -1406,6 +1406,7 @@ void CDriverGL::setupFog(float start, float end, CRGBA color)
|
|||
|
||||
glFogfv(GL_FOG_COLOR, _CurrentFogColor);
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
/** Special : with vertex program, using the extension EXT_vertex_shader, fog is emulated using 1 more constant to scale result to [0, 1]
|
||||
*/
|
||||
if (_Extensions.EXTVertexShader && !_Extensions.NVVertexProgram && !_Extensions.ARBVertexProgram)
|
||||
|
@ -1425,6 +1426,8 @@ void CDriverGL::setupFog(float start, float end, CRGBA color)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
_FogStart = start;
|
||||
_FogEnd = end;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace NLDRIVERGL {
|
|||
CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoPtrList it) : IProgramDrvInfos (drv, it)
|
||||
{
|
||||
H_AUTO_OGL(CPixelProgamDrvInfosGL_CPixelProgamDrvInfosGL)
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
// Extension must exist
|
||||
nlassert(drv->_Extensions.ARBFragmentProgram);
|
||||
|
||||
|
@ -61,6 +63,7 @@ CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoP
|
|||
{
|
||||
nglGenProgramsARB(1, &ID);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -96,6 +99,7 @@ bool CDriverGL::activePixelProgram(CPixelProgram *program)
|
|||
|
||||
bool CDriverGL::compilePixelProgram(NL3D::CPixelProgram *program)
|
||||
{
|
||||
#ifndef USE_OPENGLES
|
||||
// Program setuped ?
|
||||
if (program->m_DrvInfo == NULL)
|
||||
{
|
||||
|
@ -121,6 +125,9 @@ bool CDriverGL::compilePixelProgram(NL3D::CPixelProgram *program)
|
|||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -129,6 +136,7 @@ bool CDriverGL::activeARBPixelProgram(CPixelProgram *program)
|
|||
{
|
||||
H_AUTO_OGL(CDriverGL_activeARBPixelProgram)
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
// Setup or unsetup ?
|
||||
if (program)
|
||||
{
|
||||
|
@ -151,14 +159,18 @@ bool CDriverGL::activeARBPixelProgram(CPixelProgram *program)
|
|||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
bool CDriverGL::setupPixelProgram(CPixelProgram *program, GLuint id/*, bool &specularWritten*/)
|
||||
{
|
||||
H_AUTO_OGL(CDriverGL_setupARBPixelProgram)
|
||||
H_AUTO_OGL(CDriverGL_setupARBPixelProgram);
|
||||
|
||||
#ifndef USE_OPENGLES
|
||||
CPixelProgamDrvInfosGL *drvInfo = static_cast<CPixelProgamDrvInfosGL *>((IProgramDrvInfos *)program->m_DrvInfo);
|
||||
|
||||
// Find a supported pixel program profile
|
||||
|
@ -226,7 +238,10 @@ bool CDriverGL::setupPixelProgram(CPixelProgram *program, GLuint id/*, bool &spe
|
|||
// Build the feature info
|
||||
program->buildInfo(source);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef NL_STATIC
|
||||
|
|
Loading…
Reference in a new issue