diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 22 | ||||
| -rw-r--r-- | drivers/png/SCsub | 11 | ||||
| -rw-r--r-- | drivers/unix/dir_access_unix.cpp | 7 | ||||
| -rw-r--r-- | drivers/windows/dir_access_windows.cpp | 7 |
4 files changed, 29 insertions, 18 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 4b976c5b06..7714a5d17a 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -6639,6 +6639,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans } rebind=true; } + if (use_hw_skeleton_xform && skeleton!=prev_skeleton) { if (!prev_skeleton || !skeleton) rebind=true; //went from skeleton <-> no skeleton, needs rebind @@ -6715,10 +6716,6 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans if (i==0 || rebind) { material_shader.set_uniform(MaterialShaderGLES2::CAMERA_INVERSE_TRANSFORM, p_view_transform_inverse); material_shader.set_uniform(MaterialShaderGLES2::PROJECTION_TRANSFORM, p_projection); - if (skeleton && use_hw_skeleton_xform) { - material_shader.set_uniform(MaterialShaderGLES2::SKELETON_MATRICES,GL_TEXTURE0+max_texture_units-2); - material_shader.set_uniform(MaterialShaderGLES2::SKELTEX_PIXEL_SIZE,skeleton->pixel_size); - } if (!shadow) { if (!additive && current_env && current_env->fx_enabled[VS::ENV_FX_AMBIENT_LIGHT]) { @@ -6733,6 +6730,13 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans _rinfo.shader_change_count++; } + if (skeleton != prev_skeleton || rebind) { + if (skeleton) { + material_shader.set_uniform(MaterialShaderGLES2::SKELETON_MATRICES, max_texture_units - 2); + material_shader.set_uniform(MaterialShaderGLES2::SKELTEX_PIXEL_SIZE, skeleton->pixel_size); + } + } + if (e->instance->billboard || e->instance->depth_scale) { Transform xf=e->instance->transform; @@ -10819,7 +10823,6 @@ void RasterizerGLES2::init() { use_depth24 =true; s3tc_supported = true; atitc_supported = false; - use_hw_skeleton_xform = false; // use_texture_instancing=false; // use_attribute_instancing=true; use_texture_instancing=false; @@ -10830,7 +10833,11 @@ void RasterizerGLES2::init() { s3tc_srgb_supported=true; use_anisotropic_filter=true; float_linear_supported=true; - float_supported=true; + + GLint vtf; + glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS,&vtf); + float_supported = extensions.has("GL_OES_texture_float") || extensions.has("GL_ARB_texture_float"); + use_hw_skeleton_xform=vtf>0 && float_supported; read_depth_supported=_test_depth_shadow_buffer(); use_rgba_shadowmaps=!read_depth_supported; @@ -10880,7 +10887,7 @@ void RasterizerGLES2::init() { GLint vtf; glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS,&vtf); - float_supported = extensions.has("GL_OES_texture_float"); + float_supported = extensions.has("GL_OES_texture_float") || extensions.has("GL_ARB_texture_float"); use_hw_skeleton_xform=vtf>0 && float_supported; float_linear_supported = extensions.has("GL_OES_texture_float_linear"); @@ -10913,7 +10920,6 @@ void RasterizerGLES2::init() { //etc_supported=false; - use_hw_skeleton_xform=false; #endif diff --git a/drivers/png/SCsub b/drivers/png/SCsub index 5532e28ade..df521de3eb 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -22,17 +22,16 @@ png_sources = [ "png/image_loader_png.cpp" ] -if ("neon_enabled" in env and env["neon_enabled"]): +# Currently .ASM filter_neon.S does not compile on NT. +import os +if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt": env.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"]) env_neon = env.Clone(); if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] #env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) - import os - # Currently .ASM filter_neon.S does not compile on NT. - if (os.name!="nt"): - png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c")) - png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S")) + png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c")) + png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S")) else: env.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 23a63be339..8b097ad25e 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -292,8 +292,11 @@ Error DirAccessUnix::rename(String p_path,String p_new_path) { } Error DirAccessUnix::remove(String p_path) { - p_path=fix_path(p_path); - + if (p_path.is_rel_path()) + p_path=get_current_dir().plus_file(p_path); + else + p_path=fix_path(p_path); + struct stat flags; if ((stat(p_path.utf8().get_data(),&flags)!=0)) return FAILED; diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 0a413979fc..b9476b870b 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -310,8 +310,11 @@ Error DirAccessWindows::rename(String p_path,String p_new_path) { Error DirAccessWindows::remove(String p_path) { - p_path=fix_path(p_path); - + if (p_path.is_rel_path()) + p_path=get_current_dir().plus_file(p_path); + else + p_path=fix_path(p_path); + printf("erasing %s\n",p_path.utf8().get_data()); //WIN32_FILE_ATTRIBUTE_DATA fileInfo; //DWORD fileAttr = GetFileAttributesExW(p_path.c_str(), GetFileExInfoStandard, &fileInfo); |