From 63d9d93dad43675b87045f0efc0ffa67a6c592b7 Mon Sep 17 00:00:00 2001 From: nitrocaster Date: Sun, 15 Nov 2015 12:49:37 +0300 Subject: [PATCH] Render resource manager: delete redundant code. --- src/Layers/xrRender/ResourceManager_Scripting.cpp | 6 +++--- .../xrRenderDX10/dx10ResourceManager_Scripting.cpp | 13 +++---------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/Layers/xrRender/ResourceManager_Scripting.cpp b/src/Layers/xrRender/ResourceManager_Scripting.cpp index d41e382d8fc..2f2e01c1212 100644 --- a/src/Layers/xrRender/ResourceManager_Scripting.cpp +++ b/src/Layers/xrRender/ResourceManager_Scripting.cpp @@ -197,7 +197,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures) { // Analyze possibility to detail this shader C.iElement = 0; - C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); + C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler); if (C.bDetail) S.E[0] = C._lua_Compile(s_shader,"normal_hq"); else S.E[0] = C._lua_Compile(s_shader,"normal"); @@ -205,7 +205,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures) if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION)) { C.iElement = 0; - C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); + C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler); S.E[0] = C._lua_Compile(s_shader,"normal"); } } @@ -214,7 +214,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures) if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION)) { C.iElement = 1; - C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); + C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler); S.E[1] = C._lua_Compile(s_shader,"normal"); } diff --git a/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp b/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp index 8e9c9980af9..522fe687013 100644 --- a/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp +++ b/src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp @@ -282,10 +282,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures) { // Analyze possibility to detail this shader C.iElement = 0; -//. C.bDetail = RImplementation.Resources->_GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler); - //C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); - // XXX: (RImplementation.Resources->) part is redundant here - C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); + C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler); if (C.bDetail) S.E[0] = C._lua_Compile(s_shader,"normal_hq"); else S.E[0] = C._lua_Compile(s_shader,"normal"); @@ -293,9 +290,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures) if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION)) { C.iElement = 0; -//. C.bDetail = RImplementation.Resources->_GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler); - //C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); - C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); + C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler); S.E[0] = C._lua_Compile(s_shader,"normal"); } } @@ -304,9 +299,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures) if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION)) { C.iElement = 1; -//. C.bDetail = RImplementation.Resources->_GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler); - //C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); - C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler); + C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler); S.E[1] = C._lua_Compile(s_shader,"normal"); }