ir
This commit is contained in:
@@ -155,7 +155,7 @@ main :: () {
|
||||
|
||||
glBindVertexArray(vao);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo);
|
||||
glBufferData(GL_ARRAY_BUFFER, 1152, @vertices, GL_STATIC_DRAW);
|
||||
glBufferData(GL_ARRAY_BUFFER, 1152, vertices.ptr, GL_STATIC_DRAW);
|
||||
|
||||
// Position attribute (location 0): 3 floats, stride 32 bytes, offset 0
|
||||
glVertexAttribPointer(0, 3, GL_FLOAT, 0, 32, xx 0);
|
||||
@@ -204,7 +204,7 @@ main :: () {
|
||||
view := mat4_translate(0.0, 0.0, -3.0);
|
||||
rot_y := mat4_rotate_y(angle);
|
||||
rot_x := mat4_rotate_x(angle * 0.7);
|
||||
model := (rot_y, rot_x).multiply();
|
||||
model := mat4_multiply(rot_y, rot_x);
|
||||
vm := mat4_multiply(view, model);
|
||||
mvp := mat4_multiply(proj, vm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user