diff options
Diffstat (limited to 'drivers/gles2/rasterizer_gles2.cpp')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 15 |
1 files changed, 12 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); |