ECF_D16 is only available in WebGL with WEBGL_depth_texture extension.
Add some more debug output to opengl texture in debug when things go wrong. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5573 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
12323e4115
commit
68480aacc7
|
@ -181,7 +181,12 @@ public:
|
|||
glTexImage2D(GL_TEXTURE_2D, 0, InternalFormat, Size.Width, Size.Height, 0, PixelFormat, PixelType, 0);
|
||||
|
||||
Driver->getCacheHandler()->getTextureCache().set(0, prevTexture);
|
||||
Driver->testGLError(__LINE__);
|
||||
if ( Driver->testGLError(__LINE__) )
|
||||
{
|
||||
char msg[256];
|
||||
snprintf_irr(msg, 256, "COpenGLCoreTexture: InternalFormat:0x%04x PixelFormat:0x%04x", (int)InternalFormat, (int)PixelFormat);
|
||||
os::Printer::log(msg, ELL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~COpenGLCoreTexture()
|
||||
|
|
|
@ -899,9 +899,12 @@ bool CWebGL1Driver::getColorFormatParameters(ECOLOR_FORMAT format, GLint& intern
|
|||
break;
|
||||
#endif
|
||||
case ECF_D16:
|
||||
supported = true;
|
||||
pixelFormat = GL_DEPTH_COMPONENT;
|
||||
pixelType = GL_UNSIGNED_SHORT;
|
||||
if (WebGLExtensions.queryWebGLFeature(CWebGLExtensionHandler::IRR_WEBGL_depth_texture))
|
||||
{
|
||||
supported = true;
|
||||
pixelFormat = GL_DEPTH_COMPONENT;
|
||||
pixelType = GL_UNSIGNED_SHORT;
|
||||
}
|
||||
break;
|
||||
case ECF_D32:
|
||||
if (WebGLExtensions.queryWebGLFeature(CWebGLExtensionHandler::IRR_WEBGL_depth_texture))
|
||||
|
|
Loading…
Reference in New Issue