mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-01 13:40:59 +00:00
GL3: Delete new shaders in GL3_ShutdownShaders()
also a small optimization in GL3_DrawAliasModel(), and adding that function to local.h
This commit is contained in:
parent
eadb607ac3
commit
5511f44c99
3 changed files with 19 additions and 1 deletions
|
@ -675,7 +675,7 @@ GL3_DrawAliasModel(entity_t *e)
|
|||
{
|
||||
gl3state.uni3DData.transProjMat4.Elements[0][i] = -gl3state.uni3DData.transProjMat4.Elements[0][i];
|
||||
}
|
||||
GL3_UpdateUBO3D();
|
||||
//GL3_UpdateUBO3D(); Note: GL3_RotateForEntity() will call this,no need to do it twice before drawing
|
||||
|
||||
glCullFace(GL_BACK);
|
||||
}
|
||||
|
|
|
@ -697,6 +697,22 @@ void GL3_ShutdownShaders(void)
|
|||
glDeleteProgram(gl3state.si3D.shaderProgram);
|
||||
memset(&gl3state.si3D, 0, sizeof(gl3ShaderInfo_t));
|
||||
|
||||
if(gl3state.si3Dflow.shaderProgram != 0)
|
||||
glDeleteProgram(gl3state.si3Dflow.shaderProgram);
|
||||
memset(&gl3state.si3Dflow, 0, sizeof(gl3ShaderInfo_t));
|
||||
|
||||
if(gl3state.si3Dturb.shaderProgram != 0)
|
||||
glDeleteProgram(gl3state.si3Dturb.shaderProgram);
|
||||
memset(&gl3state.si3Dturb, 0, sizeof(gl3ShaderInfo_t));
|
||||
|
||||
if(gl3state.si3Dalias.shaderProgram != 0)
|
||||
glDeleteProgram(gl3state.si3Dalias.shaderProgram);
|
||||
memset(&gl3state.si3Dalias, 0, sizeof(gl3ShaderInfo_t));
|
||||
|
||||
if(gl3state.si3DaliasColor.shaderProgram != 0)
|
||||
glDeleteProgram(gl3state.si3DaliasColor.shaderProgram);
|
||||
memset(&gl3state.si3DaliasColor, 0, sizeof(gl3ShaderInfo_t));
|
||||
|
||||
glDeleteBuffers(3, &gl3state.uniCommonUBO);
|
||||
gl3state.uniCommonUBO = gl3state.uni2DUBO = gl3state.uni3DUBO = 0;
|
||||
}
|
||||
|
|
|
@ -387,6 +387,8 @@ extern void GL3_DrawBrushModel(entity_t *e);
|
|||
extern void GL3_DrawWorld(void);
|
||||
extern void GL3_MarkLeaves(void);
|
||||
|
||||
// gl3_mesh.c
|
||||
extern void GL3_DrawAliasModel(entity_t *e);
|
||||
|
||||
// gl3_shaders.c
|
||||
|
||||
|
|
Loading…
Reference in a new issue