Browse Source

Added recursive rendering check.

Mark Sibly 7 năm trước cách đây
mục cha
commit
f7e28c779f
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      modules/mojo/app/window.monkey2

+ 6 - 1
modules/mojo/app/window.monkey2

@@ -557,9 +557,13 @@ Class Window Extends View
 	#end
 	Method RenderWindow()
 		
+		Assert( _canRender )
+		
+		_canRender=False
+		
 		If _maxfudge
 			_maxfudge-=1
-			App.RequestRender()
+			RequestRender()
 		Endif
 
 		SDL_GL_MakeCurrent( _sdlWindow,_sdlGLContext )
@@ -595,6 +599,7 @@ Class Window Extends View
 			swapBuffers( _sdlWindow,_sdlGLContext )
 		Else
 			SDL_GL_SwapWindow( _sdlWindow )
+			_canRender=True
 		Endif
 	End