File tree 3 files changed +32
-1
lines changed
3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,6 @@ class Shader
118
118
public function release () {
119
119
if (! active ) return ;
120
120
disableAttributes ();
121
- GL .useProgram (null );
122
121
active = false ;
123
122
}
124
123
public function dispose () {
Original file line number Diff line number Diff line change
1
+ package shaderblox .uniforms ;
2
+ import snow .render .opengl .GL ;
3
+
4
+ /**
5
+ * Bool uniform
6
+ * @author Andreas Rønning
7
+ */
8
+ class UBool extends UniformBase <Bool > implements IAppliable {
9
+ public function new (name : String , index : Int , f : Bool = false ) {
10
+ super (name , index , f );
11
+ }
12
+ public inline function apply (): Void {
13
+ GL .uniform1i (location , data ? 1 : 0 );
14
+ dirty = false ;
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ package shaderblox .uniforms ;
2
+ import snow .render .opengl .GL ;
3
+
4
+ /**
5
+ * Int uniform
6
+ * @author Andreas Rønning
7
+ */
8
+ class UInt extends UniformBase <Int > implements IAppliable {
9
+ public function new (name : String , index : Int , f : Int = 0 ) {
10
+ super (name , index , f );
11
+ }
12
+ public inline function apply (): Void {
13
+ GL .uniform1i (location , data );
14
+ dirty = false ;
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments