- Fixed issue with depth color formats in OpenGL drivers (example no. 13 works properly at now).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5221 dfc29bdd-3216-0410-991c-e03cc46cb475
master
nadro 2015-12-17 12:44:24 +00:00
parent e604a608eb
commit 0200408475
2 changed files with 12 additions and 9 deletions

View File

@ -2772,17 +2772,19 @@ COGLES2Driver::~COGLES2Driver()
case ECF_D16:
internalFormat = GL_DEPTH_COMPONENT16;
pixelFormat = GL_DEPTH_COMPONENT;
pixelType = GL_UNSIGNED_BYTE;
pixelType = GL_UNSIGNED_SHORT;
break;
case ECF_D32:
#if defined(GL_OES_depth32)
if (queryOpenGLFeature(COGLES2ExtensionHandler::IRR_OES_depth32))
{
internalFormat = GL_DEPTH_COMPONENT32_OES;
pixelFormat = GL_DEPTH_COMPONENT;
pixelType = GL_UNSIGNED_INT;
}
else
#endif
internalFormat = GL_DEPTH_COMPONENT16;
pixelFormat = GL_DEPTH_COMPONENT;
pixelType = GL_UNSIGNED_BYTE;
os::Printer::log("ECF_D32 color format is not supported", ELL_ERROR);
break;
case ECF_D24S8:
#ifdef GL_OES_packed_depth_stencil

View File

@ -3148,19 +3148,20 @@ void COGLES1Driver::getColorFormatParameters(ECOLOR_FORMAT format, GLint& intern
case ECF_D16:
internalFormat = GL_DEPTH_COMPONENT16;
pixelFormat = GL_DEPTH_COMPONENT;
pixelType = GL_UNSIGNED_BYTE;
pixelType = GL_UNSIGNED_SHORT;
break;
case ECF_D32:
#if defined(GL_OES_depth32)
if (queryOpenGLFeature(COGLES1ExtensionHandler::IRR_OES_depth32))
{
internalFormat = GL_DEPTH_COMPONENT32_OES;
pixelFormat = GL_DEPTH_COMPONENT;
pixelType = GL_UNSIGNED_INT;
}
else
#endif
internalFormat = GL_DEPTH_COMPONENT16;
pixelFormat = GL_DEPTH_COMPONENT;
pixelType = GL_UNSIGNED_BYTE;
os::Printer::log("ECF_D32 color format is not supported", ELL_ERROR);
break;
case ECF_D24S8:
#ifdef GL_OES_packed_depth_stencil
if (queryOpenGLFeature(COGLES1ExtensionHandler::IRR_OES_packed_depth_stencil))
{