Don't "DirtyShader" at the end of frame, instead just "stop". Fixes issues caused by vertex arrays left enabled still hanging around.

This commit is contained in:
Henrik Rydgard 2013-04-07 23:31:04 +02:00
parent 84ca406b7b
commit 5427f20b90
4 changed files with 11 additions and 3 deletions

View File

@ -273,8 +273,8 @@ void GLES_GPU::CopyDisplayToOutput() {
framebufferManager_.CopyDisplayToOutput();
framebufferManager_.EndFrame();
shaderManager_->DirtyShader();
shaderManager_->DirtyUniform(DIRTY_ALL);
shaderManager_->EndFrame();
gstate_c.textureChanged = true;
BeginDebugDraw();

View File

@ -377,6 +377,13 @@ void ShaderManager::DirtyShader()
lastShader = 0;
}
void ShaderManager::EndFrame() // disables vertex arrays
{
if (lastShader)
lastShader->stop();
lastShader = 0;
}
LinkedShader *ShaderManager::ApplyShader(int prim) {
if (globalDirty) {

View File

@ -141,6 +141,7 @@ public:
LinkedShader *ApplyShader(int prim);
void DirtyShader();
void DirtyUniform(u32 what);
void EndFrame(); // disables vertex arrays
int NumVertexShaders() const { return (int)vsCache.size(); }
int NumFragmentShaders() const { return (int)fsCache.size(); }

2
native

@ -1 +1 @@
Subproject commit f71f3183b2149a59660a05b2aed8e25d2d278ceb
Subproject commit c0963ec11fd57f2bd3d389464b3e1455bbc5a6a4