diff options
author | Kostadin Damyanov <maxmight@gmail.com> | 2015-10-13 05:01:54 +0300 |
---|---|---|
committer | Kostadin Damyanov <maxmight@gmail.com> | 2015-10-13 05:01:54 +0300 |
commit | 29caf2bb5be061cd1ab014cf938f2c71d0bd2663 (patch) | |
tree | 859a0c3d2805198672c1e22d4780c3eb68f55a57 /drivers/gles2 | |
parent | c5f574b914b3cb11d97ae616df4a0bced45bb17c (diff) | |
parent | 79e5ced7e668fa53567ac6aaf5a26393cea6c9a2 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 15 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_gles2.h | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index d3a5f3b5bc..3d75ed29f3 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -4145,7 +4145,7 @@ void RasterizerGLES2::begin_frame() { //fragment_lighting=Globals::get_singleton()->get("rasterizer/use_fragment_lighting"); #ifdef TOOLS_ENABLED - canvas_shader.set_conditional(CanvasShaderGLES2::USE_PIXEL_SNAP,GLOBAL_DEF("rasterizer/use_pixel_snap",false)); + canvas_shader.set_conditional(CanvasShaderGLES2::USE_PIXEL_SNAP,GLOBAL_DEF("display/use_2d_pixel_snap",false)); shadow_filter=ShadowFilterTechnique(int(Globals::get_singleton()->get("rasterizer/shadow_filter"))); #endif @@ -4160,7 +4160,6 @@ void RasterizerGLES2::begin_frame() { time_delta=time-last_time; last_time=time; frame++; - clear_viewport(Color(1,0,0.5)); _rinfo.vertex_count=0; _rinfo.object_count=0; @@ -5970,6 +5969,10 @@ void RasterizerGLES2::_render(const Geometry *p_geometry,const Material *p_mater if (element_count==0) return; + if (mm->visible>=0) { + element_count=MIN(element_count,mm->visible); + } + const MultiMesh::Element *elements=&mm->elements[0]; _rinfo.vertex_count+=s->array_len*element_count; @@ -10804,7 +10807,7 @@ void RasterizerGLES2::init() { copy_shader.set_conditional(CopyShaderGLES2::USE_8BIT_HDR,!use_fp16_fb); canvas_shader.set_conditional(CanvasShaderGLES2::USE_DEPTH_SHADOWS,read_depth_supported); - canvas_shader.set_conditional(CanvasShaderGLES2::USE_PIXEL_SNAP,GLOBAL_DEF("rasterizer/use_pixel_snap",false)); + canvas_shader.set_conditional(CanvasShaderGLES2::USE_PIXEL_SNAP,GLOBAL_DEF("display/use_2d_pixel_snap",false)); npo2_textures_available=true; //fragment_lighting=false; @@ -11188,6 +11191,12 @@ RasterizerGLES2::RasterizerGLES2(bool p_compress_arrays,bool p_keep_ram_copy,boo tc0_idx=0; }; +void RasterizerGLES2::restore_framebuffer() { + + glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer); + +} + RasterizerGLES2::~RasterizerGLES2() { memdelete_arr(skinned_buffer); diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h index d337ecfb64..f759e84b53 100644 --- a/drivers/gles2/rasterizer_gles2.h +++ b/drivers/gles2/rasterizer_gles2.h @@ -1695,6 +1695,8 @@ public: void reload_vram(); virtual bool has_feature(VS::Features p_feature) const; + + virtual void restore_framebuffer(); static RasterizerGLES2* get_singleton(); |