diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-12-20 09:29:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-20 09:29:09 +0100 |
commit | d1a6b394d7b88b61630859c60b83f4a7c5a4c53a (patch) | |
tree | 8f0be9577ab8f5ee23a4f4c00ea8ab91e0ccfc21 /drivers | |
parent | b3a70f0b8002f8290a774933b867b9c586bb4b7a (diff) | |
parent | 28543667fd6663132504824c7318ad4473c21c5d (diff) |
Merge pull request #34473 from clayjohn/GLES2-renderbuffer-format
Always use 16 bit renderbuffer depth on WebGL
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 388a8423a0..60f72608a8 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -5812,10 +5812,11 @@ void RasterizerStorageGLES2::initialize() { config.support_npot_repeat_mipmap = config.extensions.has("GL_OES_texture_npot"); #ifdef JAVASCRIPT_ENABLED - // no way of detecting 32 or 16 bit support for renderbuffer, so default to 32 + // RenderBuffer internal format must be 16 bits in WebGL, + // but depth_texture should default to 32 always // if the implementation doesn't support 32, it should just quietly use 16 instead // https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ - config.depth_buffer_internalformat = GL_DEPTH_COMPONENT; + config.depth_buffer_internalformat = GL_DEPTH_COMPONENT16; config.depth_type = GL_UNSIGNED_INT; #else // on mobile check for 24 bit depth support for RenderBufferStorage |