marksibly пре 8 година
родитељ
комит
e4e0a1b8ab

+ 1 - 1
modules/mojo/graphics/glexts/glexts.monkey2

@@ -42,7 +42,7 @@ Function glDrawBuffers( n:Int,bufs:GLenum Ptr )="bbGLexts::glDrawBuffers"
 
 
 Function InitGLexts()="bbGLexts::init"
 Function InitGLexts()="bbGLexts::init"
 
 
-#Elseif __TARGET__="macos"
+#Elseif __TARGET__="macos" or __TARGET__="linux"
 
 
 Const GL_draw_buffers:Bool=True
 Const GL_draw_buffers:Bool=True
 Const GL_texture_float:Bool=True
 Const GL_texture_float:Bool=True

+ 23 - 13
modules/mojo/graphics/glutil.monkey2

@@ -98,21 +98,31 @@ End
 #end
 #end
 Function glCompile:Int( type:Int,source:String )
 Function glCompile:Int( type:Int,source:String )
 	
 	
-	#If __TARGET__="windows" Or __TARGET__="emscripten"
+#If __TARGET__="windows" Or __TARGET__="emscripten"
 	Const prefix:="
 	Const prefix:="
-	#extension GL_EXT_draw_buffers : require	
-	#ifdef GL_ES
-	#ifdef GL_FRAGMENT_PRECISION_HIGH
-	precision highp float;
-	#else
-	precision mediump float;
-	#endif
-	#endif
-	"
-	#Else
+#extension GL_EXT_draw_buffers : require	
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+"
+#Else if __TARGET__="linux"
 	Const prefix:="
 	Const prefix:="
-	"
-	#Endif
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+"
+#Else
+	Const prefix:="
+"
+#Endif
 
 
 	source=prefix+source
 	source=prefix+source
 	
 	

+ 0 - 14
modules/mojo/graphics/graphicsdevice.monkey2

@@ -425,16 +425,12 @@ Class GraphicsDevice
 	
 	
 	Method Validate()
 	Method Validate()
 
 
-		glCheck()
-				
 		If _glSeq<>glGraphicsSeq
 		If _glSeq<>glGraphicsSeq
 			_glSeq=glGraphicsSeq
 			_glSeq=glGraphicsSeq
 			_current=Null
 			_current=Null
 			InitGL()
 			InitGL()
 		Endif
 		Endif
 		
 		
-		glCheck()
-				
 		If _current<>Self
 		If _current<>Self
 			If _current _current.FlushTarget()
 			If _current _current.FlushTarget()
 			_current=Self
 			_current=Self
@@ -444,8 +440,6 @@ Class GraphicsDevice
 			If Not _dirty Return
 			If Not _dirty Return
 		Endif
 		Endif
 		
 		
-		glCheck()
-				
 		If _dirty & Dirty.RenderTarget
 		If _dirty & Dirty.RenderTarget
 			
 			
 			If _rtarget
 			If _rtarget
@@ -461,8 +455,6 @@ Class GraphicsDevice
 
 
 		Endif
 		Endif
 	
 	
-		glCheck()
-				
 		If _dirty & Dirty.Viewport
 		If _dirty & Dirty.Viewport
 			
 			
 			If _rtarget
 			If _rtarget
@@ -473,8 +465,6 @@ Class GraphicsDevice
 			
 			
 		Endif
 		Endif
 		
 		
-		glCheck()
-				
 		If _dirty & Dirty.Scissor
 		If _dirty & Dirty.Scissor
 		
 		
 			Local scissor:=_scissor & _viewport
 			Local scissor:=_scissor & _viewport
@@ -491,8 +481,6 @@ Class GraphicsDevice
 		
 		
 		Endif
 		Endif
 		
 		
-		glCheck()
-				
 		If _dirty & Dirty.ColorMask
 		If _dirty & Dirty.ColorMask
 			
 			
 			Local r:=Bool( _colorMask & ColorMask.Red )
 			Local r:=Bool( _colorMask & ColorMask.Red )
@@ -504,8 +492,6 @@ Class GraphicsDevice
 		
 		
 		Endif
 		Endif
 		
 		
-		glCheck()
-				
 		If _dirty & Dirty.DepthMask
 		If _dirty & Dirty.DepthMask
 			
 			
 			glDepthMask( _depthMask )
 			glDepthMask( _depthMask )