...
This commit is contained in:
@@ -15,8 +15,7 @@ Matrix44 :: struct {
|
||||
}
|
||||
|
||||
mat4_zero :: (m: *Matrix44) {
|
||||
i := 0;
|
||||
while i < 16 { m.data[i] = 0.0; i += 1; }
|
||||
memset(xx @m.data[0], 0, 16 * size_of(f32));
|
||||
}
|
||||
|
||||
mat4_identity :: (m: *Matrix44) {
|
||||
@@ -41,8 +40,7 @@ mat4_multiply :: (out: *Matrix44, a: *Matrix44, b: *Matrix44) {
|
||||
}
|
||||
j += 1;
|
||||
}
|
||||
i := 0;
|
||||
while i < 16 { out.data[i] = tmp[i]; i += 1; }
|
||||
out.data = tmp;
|
||||
}
|
||||
|
||||
mat4_perspective :: (m: *Matrix44, fov: f32, aspect: f32, near: f32, far: f32) {
|
||||
@@ -149,7 +147,7 @@ main :: () {
|
||||
glDepthFunc(GL_LESS);
|
||||
|
||||
// Shaders
|
||||
vert_src : [:0]u8 = #string GLSL
|
||||
vert_src : [:0]u8 = #string glsl
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aNormal;
|
||||
@@ -162,7 +160,7 @@ void main() {
|
||||
vNormal = aNormal;
|
||||
vPos = aPos;
|
||||
}
|
||||
GLSL;
|
||||
glsl;
|
||||
|
||||
frag_src : [:0]u8 = #string GLSL
|
||||
#version 330 core
|
||||
|
||||
Reference in New Issue
Block a user