Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
e8d652f1
Commit
e8d652f1
authored
Dec 09, 2019
by
clayjohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force 32 bit depth buffer for WebGL
parent
269145a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
rasterizer_storage_gles2.cpp
drivers/gles2/rasterizer_storage_gles2.cpp
+8
-0
No files found.
drivers/gles2/rasterizer_storage_gles2.cpp
View file @
e8d652f1
...
...
@@ -5807,6 +5807,13 @@ void RasterizerStorageGLES2::initialize() {
config
.
pvrtc_supported
=
config
.
extensions
.
has
(
"IMG_texture_compression_pvrtc"
)
||
config
.
extensions
.
has
(
"WEBGL_compressed_texture_pvrtc"
);
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
// 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_type
=
GL_UNSIGNED_INT
;
#else
// on mobile check for 24 bit depth support for RenderBufferStorage
if
(
config
.
extensions
.
has
(
"GL_OES_depth24"
))
{
config
.
depth_buffer_internalformat
=
_DEPTH_COMPONENT24_OES
;
...
...
@@ -5816,6 +5823,7 @@ void RasterizerStorageGLES2::initialize() {
config
.
depth_type
=
GL_UNSIGNED_SHORT
;
}
#endif
#endif
#ifndef GLES_OVER_GL
//Manually load extensions for android and ios
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment