diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-02-27 08:57:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-02-27 09:01:24 +0100 |
commit | 0ba75c195efffcb098ac74440ffb0fa9c85d0d96 (patch) | |
tree | 4beaa2d008b5c40a469319552e46cfc8e9e94eb0 /drivers | |
parent | caa42667e801318fcb78c9f52921a48cf985b62f (diff) |
Fix GCC 5 build after #26331 and cleanup style
Also cleanup after 01a3dd3.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 4 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 2 | ||||
-rw-r--r-- | drivers/gles2/shaders/canvas.glsl | 2 | ||||
-rw-r--r-- | drivers/gles2/shaders/cubemap_filter.glsl | 2 | ||||
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 4 |
5 files changed, 3 insertions, 11 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index de77c2c63e..32133632bd 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -42,8 +42,6 @@ #define glClearDepth glClearDepthf #endif -#define _DEPTH_COMPONENT24_OES 0x81A6 - static const GLenum _cube_side_enum[6] = { GL_TEXTURE_CUBE_MAP_NEGATIVE_X, @@ -569,7 +567,7 @@ bool RasterizerSceneGLES2::reflection_probe_instance_begin_render(RID p_instance glBindFramebuffer(GL_FRAMEBUFFER, rpi->fbo[i]); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, _cube_side_enum[i], rpi->cubemap, 0); glBindRenderbuffer(GL_RENDERBUFFER, rpi->depth); - glRenderbufferStorage(GL_RENDERBUFFER, _DEPTH_COMPONENT24_OES, size, size); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, size, size); // Note: used to be _DEPTH_COMPONENT24_OES. GL_DEPTH_COMPONENT untested. glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rpi->depth); #ifdef DEBUG_ENABLED diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index a877c1d03f..9d2e609e5e 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -54,8 +54,6 @@ GLuint RasterizerStorageGLES2::system_fbo = 0; #define _EXT_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#define _DEPTH_COMPONENT24_OES 0x81A6 - #define _RED_OES 0x1903 void RasterizerStorageGLES2::bind_quad_array() const { diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index c292897ad0..b13801946f 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -349,7 +349,7 @@ void main() { vec2 uv = uv_interp; #ifdef USE_FORCE_REPEAT //needs to use this to workaround GLES2/WebGL1 forcing tiling that textures that dont support it - uv = mod(uv,vec2(1.0,1.0)); + uv = mod(uv, vec2(1.0, 1.0)); #endif #if !defined(COLOR_USED) diff --git a/drivers/gles2/shaders/cubemap_filter.glsl b/drivers/gles2/shaders/cubemap_filter.glsl index c32aabc4bf..a6902836ed 100644 --- a/drivers/gles2/shaders/cubemap_filter.glsl +++ b/drivers/gles2/shaders/cubemap_filter.glsl @@ -194,7 +194,7 @@ void main() { gl_FragColor = vec4(texturePanorama(source_panorama, N).rgb, 1.0); #else - gl_FragColor = vec4(textureCube(source_cube,N).rgb, 1.0); + gl_FragColor = vec4(textureCube(source_cube, N).rgb, 1.0); #endif //USE_SOURCE_PANORAMA #else diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index fa359125b2..371ea8498a 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -660,7 +660,6 @@ VERTEX_SHADER_CODE #if defined(RENDER_DEPTH) && defined(USE_RGBA_SHADOWS) position_interp = gl_Position; #endif - } /* clang-format off */ @@ -1358,12 +1357,9 @@ LIGHT_SHADER_CODE #endif - #define SAMPLE_SHADOW_TEXEL(p_shadow, p_pos, p_depth) step(p_depth, SHADOW_DEPTH(texture2D(p_shadow, p_pos))) #define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, SHADOW_DEPTH(texture2DProj(p_shadow, p_pos))) - - float sample_shadow(highp sampler2D shadow, highp vec4 spos) { #ifdef SHADOW_MODE_PCF_13 |