@@ -308,6 +308,17 @@ pub const ParameterName = enum(Enum) {
308
308
timestamp = TIMESTAMP ,
309
309
};
310
310
311
+ pub const DepthFunc = enum (Enum ) {
312
+ never = NEVER ,
313
+ less = LESS ,
314
+ equal = EQUAL ,
315
+ lequal = LEQUAL ,
316
+ greater = GREATER ,
317
+ notequal = NOTEQUAL ,
318
+ gequal = GEQUAL ,
319
+ always = ALWAYS ,
320
+ };
321
+
311
322
pub const ShaderType = enum (Enum ) {
312
323
//----------------------------------------------------------------------------------------------
313
324
// OpenGL 2.0 (Core Profile)
@@ -962,7 +973,12 @@ pub fn enable(capability: Capability) void {
962
973
// pub var logicOp: *const fn (opcode: Enum) callconv(.C) void = undefined;
963
974
// pub var stencilFunc: *const fn (func: Enum, ref: Int, mask: Uint) callconv(.C) void = undefined;
964
975
// pub var stencilOp: *const fn (fail: Enum, zfail: Enum, zpass: Enum) callconv(.C) void = undefined;
976
+
965
977
// pub var depthFunc: *const fn (func: Enum) callconv(.C) void = undefined;
978
+ pub fn depthFunc (func : DepthFunc ) void {
979
+ bindings .depthFunc (@enumToInt (func ));
980
+ }
981
+
966
982
// pub var pixelStoref: *const fn (pname: Enum, param: Float) callconv(.C) void = undefined;
967
983
// pub var pixelStorei: *const fn (pname: Enum, param: Int) callconv(.C) void = undefined;
968
984
// pub var readBuffer: *const fn (src: Enum) callconv(.C) void = undefined;
@@ -1026,7 +1042,11 @@ pub fn getString(name: StringName) [*:0]const u8 {
1026
1042
// ) callconv(.C) void = undefined;
1027
1043
// pub var isEnabled: *const fn (cap: Enum) callconv(.C) Boolean = undefined;
1028
1044
// pub var depthRange: *const fn (n: Double, f: Double) callconv(.C) void = undefined;
1045
+
1029
1046
// pub var viewport: *const fn (x: Int, y: Int, width: Sizei, height: Sizei) callconv(.C) void = undefined;
1047
+ pub fn viewport (x : Int , y : Int , width : u32 , height : u32 ) void {
1048
+ bindings .viewport (x , y , @bitCast (Sizei , width ), @bitCast (Sizei , height ));
1049
+ }
1030
1050
1031
1051
//--------------------------------------------------------------------------------------------------
1032
1052
//
0 commit comments