Mark Sibly vor 8 Jahren
Ursprung
Commit
9653e41453
2 geänderte Dateien mit 7 neuen und 4 gelöschten Zeilen
  1. 3 0
      modules/mojo/graphics/rendertarget.monkey2
  2. 4 4
      modules/mojo/graphics/texture.monkey2

+ 3 - 0
modules/mojo/graphics/rendertarget.monkey2

@@ -64,6 +64,9 @@ Class RenderTarget Extends Resource
 			err="GL_FRAMEBUFFER_?????"
 			err="GL_FRAMEBUFFER_?????"
 		End
 		End
 		
 		
+		Print "ColorTexture0 format="+(_colorTextures ? Cast<Int>( _colorTextures[0].Format ) Else 0)
+		Print "DepthTexture format="+(_depthTexture ? Cast<Int>( _depthTexture.Format ) Else 0)
+		
 		RuntimeError( "Framebuffer incomplete: status="+err )
 		RuntimeError( "Framebuffer incomplete: status="+err )
 	End
 	End
 	
 	

+ 4 - 4
modules/mojo/graphics/texture.monkey2

@@ -11,7 +11,7 @@ Function IsPow2:Bool( w:Int,h:Int )
 End
 End
 
 
 Function IsDepth:Bool( format:PixelFormat )
 Function IsDepth:Bool( format:PixelFormat )
-	Return format=PixelFormat.Depth32F
+	Return format=PixelFormat.Depth32
 End
 End
 
 
 Function glInternalFormat:GLenum( format:PixelFormat )
 Function glInternalFormat:GLenum( format:PixelFormat )
@@ -23,7 +23,7 @@ Function glInternalFormat:GLenum( format:PixelFormat )
 	Case PixelFormat.RGBA8 Return GL_RGBA
 	Case PixelFormat.RGBA8 Return GL_RGBA
 	Case PixelFormat.RGBA16F Return GL_RGBA
 	Case PixelFormat.RGBA16F Return GL_RGBA
 	Case PixelFormat.RGBA32F Return GL_RGBA
 	Case PixelFormat.RGBA32F Return GL_RGBA
-	Case PixelFormat.Depth32F Return GL_DEPTH_COMPONENT
+	Case PixelFormat.Depth32 Return GL_DEPTH_COMPONENT
 	End
 	End
 	RuntimeError( "Invalid PixelFormat" )
 	RuntimeError( "Invalid PixelFormat" )
 	Return GL_RGBA
 	Return GL_RGBA
@@ -38,7 +38,7 @@ Function glFormat:GLenum( format:PixelFormat )
 	Case PixelFormat.RGBA8 Return GL_RGBA
 	Case PixelFormat.RGBA8 Return GL_RGBA
 	Case PixelFormat.RGBA16F Return GL_RGBA
 	Case PixelFormat.RGBA16F Return GL_RGBA
 	Case PixelFormat.RGBA32F Return GL_RGBA
 	Case PixelFormat.RGBA32F Return GL_RGBA
-	Case PixelFormat.Depth32F Return GL_DEPTH_COMPONENT
+	Case PixelFormat.Depth32 Return GL_DEPTH_COMPONENT
 	End
 	End
 	RuntimeError( "Invalid PixelFormat" )
 	RuntimeError( "Invalid PixelFormat" )
 	Return GL_RGBA
 	Return GL_RGBA
@@ -53,7 +53,7 @@ Function glType:GLenum( format:PixelFormat )
 	Case PixelFormat.RGBA8 Return GL_UNSIGNED_BYTE
 	Case PixelFormat.RGBA8 Return GL_UNSIGNED_BYTE
 	Case PixelFormat.RGBA16F Return GL_HALF_FLOAT
 	Case PixelFormat.RGBA16F Return GL_HALF_FLOAT
 	Case PixelFormat.RGBA32F Return GL_FLOAT
 	Case PixelFormat.RGBA32F Return GL_FLOAT
-	Case PixelFormat.Depth32F Return GL_UNSIGNED_INT
+	Case PixelFormat.Depth32 Return GL_UNSIGNED_INT
 	End
 	End
 	RuntimeError( "Invalid PixelFormat" )
 	RuntimeError( "Invalid PixelFormat" )
 	Return GL_UNSIGNED_BYTE
 	Return GL_UNSIGNED_BYTE