Skip to content

Commit d6e8203

Browse files
committed
Merge branch 'master' of https://github.com/haxiomic/shaderblox
2 parents 6ea0df9 + e7ab566 commit d6e8203

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

shaderblox/Shader.hx

-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ class Shader
118118
public function release() {
119119
if (!active) return;
120120
disableAttributes();
121-
GL.useProgram(null);
122121
active = false;
123122
}
124123
public function dispose() {

shaderblox/uniforms/UBool.hx

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
}

shaderblox/uniforms/UInt.hx

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
}

0 commit comments

Comments
 (0)