2
0
Mark Sibly 8 жил өмнө
parent
commit
4e887be54c

+ 3 - 0
bananas/sdl2test/sdl2test.monkey2

@@ -22,6 +22,9 @@ Class SdlWindow
 		
 		SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK,SDL_GL_CONTEXT_PROFILE_ES )
 		
+		SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION,2 )
+		SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION,0 )
+		
 		sdlWindow=SDL_CreateWindow( "SDL2 OpenGL Window",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,640,480,SDL_WINDOW_OPENGL )
 		
 		sdlGLContext=SDL_GL_CreateContext( sdlWindow )

+ 11 - 8
modules/mojo/app/app.monkey2

@@ -313,6 +313,8 @@ Class AppInstance
 		Return _mouseLocation
 	End
 	
+	#rem monkeydoc @hidden
+	#end
 	Property ModalView:View()
 	
 		Return _modalView
@@ -335,8 +337,11 @@ Class AppInstance
 		Return std.time.Millisecs()
 	End
 	
-#If __TARGET__<>"emscripten"
-
+	#rem monkeydoc Puts the app to sleep.
+	
+	Note: Use of this method is not recommended, as the app will be unresponsive while sleeping!
+	
+	#end
 	Method Sleep( seconds:Double )
 	
 		Local timeout:=Now()+seconds
@@ -354,8 +359,6 @@ Class AppInstance
 		Forever
 	
 	End
-
-#endif
 	
 #If __DESKTOP_TARGET__
 	
@@ -431,7 +434,7 @@ Class AppInstance
 		_requestRender=True
 	End
 
-	#rem @hidden
+	#rem monkeydoc @hidden
 	#end
 	Method MainLoop()
 	
@@ -446,14 +449,14 @@ Class AppInstance
 		UpdateWindows()
 	End
 	
-	#rem @hiddden
+	#rem monkeydoc @hidden
 	#end
 	Method IsActive:Bool( view:View )
 	
 		Return view And view.Active And (Not _modalView Or view.IsChildOf( _modalView ))
 	End
 	
-	#rem @hiddden
+	#rem monkeydoc @hidden
 	#end
 	Method ActiveViewAtMouseLocation:View()
 	
@@ -465,7 +468,7 @@ Class AppInstance
 		Return Null
 	End
 
-	#rem @hidden
+	#rem monkeydoc @hidden
 	#end	
 	Method UpdateWindows()