Skip to content

Commit 66d44c4

Browse files
committed
2 parents c562e4d + e8d0c8c commit 66d44c4

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

libs/zopengl/src/wrapper.zig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,29 @@ pub const DepthFunc = enum(Enum) {
319319
always = ALWAYS,
320320
};
321321

322+
pub const BlendFactor = enum(Enum) {
323+
//----------------------------------------------------------------------------------------------
324+
// OpenGL 1.0 (Core Profile)
325+
//----------------------------------------------------------------------------------------------
326+
zero = ZERO,
327+
one = ONE,
328+
src_color = SRC_COLOR,
329+
one_minus_src_color = ONE_MINUS_SRC_COLOR,
330+
dst_color = DST_COLOR,
331+
one_minus_dst_color = ONE_MINUS_DST_COLOR,
332+
src_alpha = SRC_ALPHA,
333+
one_minus_src_alpha = ONE_MINUS_SRC_ALPHA,
334+
dst_alpha = DST_ALPHA,
335+
one_minus_dst_alpha = ONE_MINUS_DST_ALPHA,
336+
//----------------------------------------------------------------------------------------------
337+
// OpenGL 1.4 (Core Profile)
338+
//----------------------------------------------------------------------------------------------
339+
constant_color = CONSTANT_COLOR,
340+
one_minus_constant_color = ONE_MINUS_CONSTANT_COLOR,
341+
constant_alpha = CONSTANT_ALPHA,
342+
one_minus_constant_alpha = ONE_MINUS_CONSTANT_ALPHA,
343+
};
344+
322345
pub const ShaderType = enum(Enum) {
323346
//----------------------------------------------------------------------------------------------
324347
// OpenGL 2.0 (Core Profile)
@@ -969,7 +992,12 @@ pub fn enable(capability: Capability) void {
969992

970993
// pub var finish: *const fn () callconv(.C) void = undefined;
971994
// pub var flush: *const fn () callconv(.C) void = undefined;
995+
972996
// pub var blendFunc: *const fn (sfactor: Enum, dfactor: Enum) callconv(.C) void = undefined;
997+
pub fn blendFunc(sfactor: BlendFactor, dfactor: BlendFactor) void {
998+
bindings.blendFunc(@enumToInt(sfactor), @enumToInt(dfactor));
999+
}
1000+
9731001
// pub var logicOp: *const fn (opcode: Enum) callconv(.C) void = undefined;
9741002
// pub var stencilFunc: *const fn (func: Enum, ref: Int, mask: Uint) callconv(.C) void = undefined;
9751003
// pub var stencilOp: *const fn (fail: Enum, zfail: Enum, zpass: Enum) callconv(.C) void = undefined;

libs/zphysics/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ const zphysics = @import("libs/zphysics/build.zig");
1919
pub fn build(b: *std.Build) void {
2020
...
2121
const zphysics_pkg = zphysics.Package.build(b, target, optimize, .{
22-
.options = .{ .use_double_precision = false },
22+
.options = .{
23+
.use_double_precision = false,
24+
.enable_cross_platform_determinism = true,
25+
},
2326
});
2427
2528
exe.addModule("zphysics", zphysics_pkg.zphysics);

0 commit comments

Comments
 (0)