Преглед изворни кода

Added support for Color params. Really just a Vec4f.

Mark Sibly пре 8 година
родитељ
комит
6c191ef936
1 измењених фајлова са 10 додато и 0 уклоњено
  1. 10 0
      modules/mojo/graphics/uniformblock.monkey2

+ 10 - 0
modules/mojo/graphics/uniformblock.monkey2

@@ -100,6 +100,16 @@ Class UniformBlock Extends Resource
 		Return GetFloatPtr( id,Type.Vec4f )
 		Return GetFloatPtr( id,Type.Vec4f )
 	End
 	End
 	
 	
+	'***** Color (really just Vec4f) *****
+	'
+	Method SetColor( uniform:String,value:Color )
+		SetFloatData( uniform,value,Type.Vec4f )
+	End
+
+	Method GetColor:Color( uniform:String )
+		Return GetFloatData<Color>( uniform,Type.Vec4f )
+	End
+	
 	'***** Mat3f *****
 	'***** Mat3f *****
 	'
 	'
 	Method SetMat3f( uniform:String,value:Mat3f )
 	Method SetMat3f( uniform:String,value:Mat3f )