git.s-ol.nu glsl-view / 311d2fa
format, remove debug GL output s-ol 2 years ago
2 changed file(s) with 11 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
7272 if (self.cache.get(buffer[0 .. param_name.len + 1]) catch null) |uniform| {
7373 if (std.mem.eql(u8, types, "f")) {
7474 uniform.value.FLOAT = argv[0].*.f;
75 } else if (std.mem.eql(u8, types, "[ff]")
76 or std.mem.eql(u8, types, "ff")) {
75 } else if (std.mem.eql(u8, types, "[ff]") or std.mem.eql(u8, types, "ff")) {
7776 for (uniform.value.FLOAT_VEC2) |*dest, i|
7877 dest.* = argv[i].*.f;
79 } else if (std.mem.eql(u8, types, "[fff]")
80 or std.mem.eql(u8, types, "fff")) {
78 } else if (std.mem.eql(u8, types, "[fff]") or std.mem.eql(u8, types, "fff")) {
8179 for (uniform.value.FLOAT_VEC3) |*dest, i|
8280 dest.* = argv[i].*.f;
83 } else if (std.mem.eql(u8, types, "[ffff]")
84 or std.mem.eql(u8, types, "ffff")) {
81 } else if (std.mem.eql(u8, types, "[ffff]") or std.mem.eql(u8, types, "ffff")) {
8582 for (uniform.value.FLOAT_VEC4) |*dest, i|
8683 dest.* = argv[i].*.f;
8784 } else if (std.mem.eql(u8, types, "i")) {
8885 uniform.value.INT = argv[0].*.i;
89 } else if (std.mem.eql(u8, types, "[ii]")
90 or std.mem.eql(u8, types, "ii")) {
86 } else if (std.mem.eql(u8, types, "[ii]") or std.mem.eql(u8, types, "ii")) {
9187 for (uniform.value.INT_VEC2) |*dest, i|
9288 dest.* = argv[i].*.i;
93 } else if (std.mem.eql(u8, types, "[iii]")
94 or std.mem.eql(u8, types, "iii")) {
89 } else if (std.mem.eql(u8, types, "[iii]") or std.mem.eql(u8, types, "iii")) {
9590 for (uniform.value.INT_VEC3) |*dest, i|
9691 dest.* = argv[i].*.i;
97 } else if (std.mem.eql(u8, types, "[iiii]")
98 or std.mem.eql(u8, types, "iiii")) {
92 } else if (std.mem.eql(u8, types, "[iiii]") or std.mem.eql(u8, types, "iiii")) {
9993 for (uniform.value.INT_VEC4) |*dest, i|
10094 dest.* = argv[i].*.i;
10195 } else {
66 pub const is_on = if (builtin.mode == builtin.Mode.ReleaseFast) c.GL_FALSE else c.GL_TRUE;
77
88 fn glDebugMessage(source: c.GLenum, typ: c.GLenum, id: c.GLuint, severity: c.GLenum, length: c.GLsizei, _message: [*c]const u8, user: ?*const c_void) callconv(.C) void {
9 switch (typ) {
10 c.GL_DEBUG_TYPE_ERROR, c.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR, c.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR => {},
11 else => return,
12 }
13
914 const message = _message[0..@intCast(usize, length)];
1015 std.debug.warn("GL Callback [{}] {} / {}: {s}\n", .{ source, typ, severity, message });
1116 }