diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-17 15:43:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-17 15:43:11 +0100 |
commit | cacab4ba6204aa36ddbc85d55705ab82b45e7930 (patch) | |
tree | 9a498561f69431b1656106198323eb9a5cd38a1c /drivers | |
parent | 8821f9b750a59ca3ec7465ce54a472eb541d7181 (diff) | |
parent | 8f25a2dc11b73cd440adcd341e4180f6f93877aa (diff) |
Merge pull request #14769 from akien-mga/if-0-cleanup
Cleanup some #if 0'd code
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_gles3.cpp | 37 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 6 | ||||
-rw-r--r-- | drivers/gles3/shader_gles3.cpp | 30 |
3 files changed, 0 insertions, 73 deletions
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index cd0adbd0d1..6b827002f8 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -354,47 +354,10 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target, const Re void RasterizerGLES3::end_frame(bool p_swap_buffers) { -#if 0 - canvas->canvas_begin(); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D,storage->resources.white_tex); - glDisable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - glDisable(GL_CULL_FACE); - - - float vtx[8]={0,0, - 0,1, - 1,1, - 1,0 - }; - - glBindBuffer(GL_ARRAY_BUFFER,0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); - - glEnableVertexAttribArray(VS::ARRAY_VERTEX); - glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, vtx ); - - - //glBindBuffer(GL_ARRAY_BUFFER,canvas->data.canvas_quad_vertices); - //glEnableVertexAttribArray(VS::ARRAY_VERTEX); - //glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, 0 ); - - glBindVertexArray(canvas->data.canvas_quad_array); - - canvas->draw_generic_textured_rect(Rect2(0,0,15,15),Rect2(0,0,1,1)); -#endif if (p_swap_buffers) OS::get_singleton()->swap_buffers(); else glFinish(); - - /* print_line("objects: "+itos(storage->info.render_object_count)); - print_line("material chages: "+itos(storage->info.render_material_switch_count)); - print_line("surface changes: "+itos(storage->info.render_surface_switch_count)); - print_line("shader changes: "+itos(storage->info.render_shader_rebind_count)); - print_line("vertices: "+itos(storage->info.render_vertices_count)); -*/ } void RasterizerGLES3::finalize() { diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 29ab531177..b777f9343a 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2786,12 +2786,6 @@ void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_c copymem(&state.omni_array_tmp[li->light_index * state.ubo_light_size], &ubo_data, state.ubo_light_size); state.omni_light_count++; -#if 0 - if (li->light_ptr->shadow_enabled) { - li->shadow_projection[0] = Transform(camera_transform_inverse * li->transform).inverse(); - lights_use_shadow=true; - } -#endif } break; case VS::LIGHT_SPOT: { diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 9e234f5005..20b2bc0a28 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -279,21 +279,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { strings.push_back("precision highp sampler2DArray;\n"); #endif -#if 0 - if (cc) { - - String _code_string = "#define VERTEX_SHADER_CODE "+cc->vertex+"\n"; - String _code_globals = "#define VERTEX_SHADER_GLOBALS "+cc->vertex_globals+"\n"; - - code_string=_code_string.ascii(); - code_globals=_code_globals.ascii(); - DEBUG_PRINT( code_globals.get_data() ); - DEBUG_PRINT( code_string.get_data() ); - strings.push_back(code_globals); - strings.push_back(code_string); - } -#endif - strings.push_back(vertex_code0.get_data()); if (cc) { @@ -382,21 +367,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { strings.push_back("precision highp sampler2DArray;\n"); #endif -#if 0 - if (cc) { - - String _code_string = "#define FRAGMENT_SHADER_CODE "+cc->fragment+"\n"; - String _code_globals = "#define FRAGMENT_SHADER_GLOBALS "+cc->fragment_globals+"\n"; - - code_string=_code_string.ascii(); - code_globals=_code_globals.ascii(); - DEBUG_PRINT( code_globals.get_data() ); - DEBUG_PRINT( code_string.get_data() ); - strings.push_back(code_globals); - strings.push_back(code_string); - } -#endif - strings.push_back(fragment_code0.get_data()); if (cc) { material_string = cc->uniforms.ascii(); |