Skip to content

Commit

Permalink
Refactor: Routines named GL_Clear<texture-type>Textures renamed to
Browse files Browse the repository at this point in the history
GL_Release<texture-type>Textures inline with naming conventions used
elsewhere.
  • Loading branch information
danij-deng committed Jul 16, 2011
1 parent 292c805 commit 7af0bc9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions doomsday/engine/portable/include/gl_texmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ void GL_ClearTextureMemory(void);
* Runtime textures are not loaded until precached or actually needed.
* They may be cleared, in which case they will be reloaded when needed.
*/
void GL_ClearRuntimeTextures(void);
void GL_ReleaseRuntimeTextures(void);

/**
* System textures are loaded at startup and remain in memory all the time.
* After clearing they must be manually reloaded.
*/
void GL_ClearSystemTextures(void);
void GL_ReleaseSystemTextures(void);

/**
* To save texture memory, delete all raw image textures. Raw images are
Expand Down
5 changes: 2 additions & 3 deletions doomsday/engine/portable/src/dd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,6 @@ static int DD_ChangeGameWorker(void* paramaters)
R_InitModels();

UI_LoadTextures();
//GL_LoadSystemFonts();
Rend_ParticleLoadExtraTextures();

Def_PostInit();
Expand Down Expand Up @@ -1051,9 +1050,9 @@ boolean DD_ChangeGame2(gameinfo_t* info, boolean allowReload)
S_Reset();
Demo_StopPlayback();

GL_ClearRuntimeTextures();
GL_ReleaseRuntimeTextures();
//GL_ShutdownFont();
UI_ClearTextures();
UI_ReleaseTextures();

// If a game is presently loaded; unload it.
if(!DD_IsNullGameInfo(DD_GameInfo()))
Expand Down
9 changes: 4 additions & 5 deletions doomsday/engine/portable/src/gl_texmanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ void GL_ShutdownTextureManager(void)
if(!texInited)
return; // Already been here?

GL_ClearSystemTextures();
GL_ReleaseSystemTextures();
destroyVariantSpecifications();
destroyTextures();
texInited = false;
Expand Down Expand Up @@ -1359,7 +1359,7 @@ void GL_LoadSystemTextures(void)
R_InitSystemTextures();
}

void GL_ClearSystemTextures(void)
void GL_ReleaseSystemTextures(void)
{
if(!texInited)
return;
Expand All @@ -1383,7 +1383,7 @@ void GL_ClearSystemTextures(void)
R_DestroySystemTextures();
}

void GL_ClearRuntimeTextures(void)
void GL_ReleaseRuntimeTextures(void)
{
if(!texInited)
return;
Expand Down Expand Up @@ -1413,8 +1413,7 @@ void GL_ClearTextureMemory(void)
{
if(!texInited)
return;
// Delete runtime textures (textures, flats, ...)
GL_ClearRuntimeTextures();
GL_ReleaseRuntimeTextures();
}

void GL_InitImage(image_t* img)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/rend_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void Rend_Init(void)
void Rend_Reset(void)
{
// Textures are deleted (at least skies need this???).
GL_ClearRuntimeTextures();
GL_ReleaseRuntimeTextures();
LO_Clear(); // Free lumobj stuff.

if(dlBBox)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/sys_sdl_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ extern boolean usingFog;

R_UnloadVectorGraphics();
Rend_ParticleReleaseExtraTextures();
GL_ClearSystemTextures();
GL_ReleaseSystemTextures();
}

if(createContext(window->width, window->height, window->normal.bpp,
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/win32/src/sys_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ extern boolean usingFog;

R_UnloadVectorGraphics();
Rend_ParticleReleaseExtraTextures();
GL_ClearSystemTextures();
GL_ReleaseSystemTextures();

wglMakeCurrent(NULL, NULL);
wglDeleteContext(window->normal.glContext);
Expand Down

0 comments on commit 7af0bc9

Please sign in to comment.