1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-25 22:09:35 +00:00

Correct combiners init/destroy.

This commit is contained in:
Sergey Lipskiy 2014-09-04 17:32:55 +07:00
parent 7f6d7e2772
commit 954d5c3552
3 changed files with 15 additions and 4 deletions

View File

@ -102,15 +102,23 @@ static DWORD64 ACEncodeD[] =
7, 7, 7, 7, 7, 7, 7, 7, 0, 1, 2, 3, 4, 5, 7, 7, 7, 7, 7, 6, 7
};
void Combiner_Init() {
CombinerInfo::get().init();
InitShaderCombiner();
}
void Combiner_Destroy() {
DestroyShaderCombiner();
CombinerInfo::get().destroy();
}
void CombinerInfo::init()
{
InitShaderCombiner();
m_pCurrent = NULL;
}
void CombinerInfo::destroy()
{
DestroyShaderCombiner();
m_pCurrent = NULL;
for (Combiners::iterator cur = m_combiners.begin(); cur != m_combiners.end(); ++cur)
delete cur->second;

View File

@ -146,5 +146,8 @@ ShaderCombiner * currentCombiner() {
return CombinerInfo::get().getCurrent();
}
void Combiner_Init();
void Combiner_Destroy();
#endif

View File

@ -516,7 +516,7 @@ bool OGL_Start()
textureCache().init();
DepthBuffer_Init();
FrameBuffer_Init();
CombinerInfo::get().init();
Combiner_Init();
OGL.renderState = GLInfo::rsNone;
gSP.changed = gDP.changed = 0xFFFFFFFF;
@ -535,7 +535,7 @@ bool OGL_Start()
void OGL_Stop()
{
CombinerInfo::get().destroy();
Combiner_Destroy();
FrameBuffer_Destroy();
DepthBuffer_Destroy();
textureCache().destroy();