Skip to content

Commit 63d9d93

Browse files
author
nitrocaster
committed
Render resource manager: delete redundant code.
1 parent 7e2fb52 commit 63d9d93

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/Layers/xrRender/ResourceManager_Scripting.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures)
197197
{
198198
// Analyze possibility to detail this shader
199199
C.iElement = 0;
200-
C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
200+
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler);
201201

202202
if (C.bDetail) S.E[0] = C._lua_Compile(s_shader,"normal_hq");
203203
else S.E[0] = C._lua_Compile(s_shader,"normal");
204204
} else {
205205
if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION))
206206
{
207207
C.iElement = 0;
208-
C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
208+
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler);
209209
S.E[0] = C._lua_Compile(s_shader,"normal");
210210
}
211211
}
@@ -214,7 +214,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures)
214214
if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION))
215215
{
216216
C.iElement = 1;
217-
C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
217+
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler);
218218
S.E[1] = C._lua_Compile(s_shader,"normal");
219219
}
220220

src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -282,20 +282,15 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures)
282282
{
283283
// Analyze possibility to detail this shader
284284
C.iElement = 0;
285-
//. C.bDetail = RImplementation.Resources->_GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler);
286-
//C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
287-
// XXX: (RImplementation.Resources->) part is redundant here
288-
C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
285+
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler);
289286

290287
if (C.bDetail) S.E[0] = C._lua_Compile(s_shader,"normal_hq");
291288
else S.E[0] = C._lua_Compile(s_shader,"normal");
292289
} else {
293290
if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION))
294291
{
295292
C.iElement = 0;
296-
//. C.bDetail = RImplementation.Resources->_GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler);
297-
//C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
298-
C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
293+
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler);
299294
S.E[0] = C._lua_Compile(s_shader,"normal");
300295
}
301296
}
@@ -304,9 +299,7 @@ Shader* CResourceManager::_lua_Create (LPCSTR d_shader, LPCSTR s_textures)
304299
if (ScriptEngine.object(s_shader,"normal",LUA_TFUNCTION))
305300
{
306301
C.iElement = 1;
307-
//. C.bDetail = RImplementation.Resources->_GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler);
308-
//C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
309-
C.bDetail = RImplementation.Resources->m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
302+
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0], C.detail_texture, C.detail_scaler);
310303
S.E[1] = C._lua_Compile(s_shader,"normal");
311304
}
312305

0 commit comments

Comments
 (0)