소스 검색

GL: Reset state when switching from compute to draw.

Branimir Karadžić 10 년 전
부모
커밋
5c7986ad38
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/renderer_gl.cpp

+ 3 - 1
src/renderer_gl.cpp

@@ -4790,6 +4790,8 @@ namespace bgfx { namespace gl
 					continue;
 				}
 
+				bool resetState = viewChanged || wasCompute;
+
 				if (wasCompute)
 				{
 					wasCompute = false;
@@ -4812,7 +4814,7 @@ namespace bgfx { namespace gl
 				uint64_t changedStencil = currentState.m_stencil ^ draw.m_stencil;
 				currentState.m_stencil = newStencil;
 
-				if (viewChanged)
+				if (resetState)
 				{
 					currentState.clear();
 					currentState.m_scissor = !draw.m_scissor;