mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix crash on loadstate.
This commit is contained in:
parent
7166d0aacf
commit
bf168bad0c
|
@ -145,7 +145,7 @@ void DepthBuffer_Destroy()
|
|||
while (depthBuffer.bottom)
|
||||
DepthBuffer_RemoveBottom();
|
||||
|
||||
depthBuffer.top = NULL;
|
||||
depthBuffer.top = depthBuffer.bottom = depthBuffer.current = NULL;
|
||||
}
|
||||
|
||||
void DepthBuffer_SetBuffer( u32 address )
|
||||
|
|
|
@ -381,8 +381,10 @@ bool OGL_Start()
|
|||
OGL_InitStates();
|
||||
|
||||
TextureCache_Init();
|
||||
DepthBuffer_Init();
|
||||
FrameBuffer_Init();
|
||||
Combiner_Init();
|
||||
OGL.renderState = GLInfo::rsNone;
|
||||
|
||||
gSP.changed = gDP.changed = 0xFFFFFFFF;
|
||||
OGL_UpdateScale();
|
||||
|
@ -395,7 +397,9 @@ void OGL_Stop()
|
|||
{
|
||||
Combiner_Destroy();
|
||||
FrameBuffer_Destroy();
|
||||
DepthBuffer_Destroy();
|
||||
TextureCache_Destroy();
|
||||
OGL.renderState = GLInfo::rsNone;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
wglMakeCurrent( NULL, NULL );
|
||||
|
@ -809,6 +813,8 @@ void OGL_DrawTriangles()
|
|||
Combiner_UpdateRenderState();
|
||||
}
|
||||
|
||||
combiner.current->compiled->UpdateColors(true);
|
||||
combiner.current->compiled->UpdateLight(true);
|
||||
glDrawElements(GL_TRIANGLES, OGL.triangles.num, GL_UNSIGNED_BYTE, OGL.triangles.elements);
|
||||
OGL.triangles.num = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user