pinshegitfeo
This commit is contained in:
28
.vscode/tasks.json
vendored
Normal file
28
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: gcc build active file",
|
||||
"command": "/usr/bin/gcc",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}/${fileBasenameNoExtension}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "Task generated by Debugger."
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
BIN
src/context.o
Normal file
BIN
src/context.o
Normal file
Binary file not shown.
@@ -1,3 +1,5 @@
|
||||
#include <cglm/cglm.h>
|
||||
|
||||
#define A -1,-1,-1,
|
||||
#define B -1,-1, 1,
|
||||
#define C -1, 1,-1,
|
||||
@@ -7,6 +9,20 @@
|
||||
#define G 1, 1,-1,
|
||||
#define H 1, 1, 1,
|
||||
|
||||
vec3 calc_normal(vec3 v1, vec3 v2, vec3 v3)
|
||||
{
|
||||
vec3 lado1, lado2, normal;
|
||||
|
||||
glm_vec3_sub(v2, v1, lado1);
|
||||
glm_vec3_sub(v3, v1, lado2);
|
||||
|
||||
glm_vec3_cross(lado1, lado2, normal);
|
||||
|
||||
glm_vec3_normalize(normal);
|
||||
|
||||
return normal;
|
||||
}
|
||||
|
||||
narray_float_t d_cube =
|
||||
{
|
||||
3*3*2*6,
|
||||
@@ -30,3 +46,32 @@ narray_float_t d_cube =
|
||||
B E F
|
||||
|
||||
};
|
||||
|
||||
narray_float_t n_cube = {
|
||||
3 * 3 * 2 * 6,
|
||||
|
||||
|
||||
calc_normal(A, C, E),
|
||||
calc_normal(A, C, E),
|
||||
calc_normal(A, C, E),
|
||||
|
||||
calc_normal(E, G, F),
|
||||
calc_normal(E, G, F),
|
||||
calc_normal(E, G, F),
|
||||
|
||||
calc_normal(A, B, F),
|
||||
calc_normal(A, B, F),
|
||||
calc_normal(A, B, F),
|
||||
|
||||
calc_normal(C, D, G),
|
||||
calc_normal(C, D, G),
|
||||
calc_normal(C, D, G),
|
||||
|
||||
calc_normal(D, H, G),
|
||||
calc_normal(D, H, G),
|
||||
calc_normal(D, H, G),
|
||||
|
||||
calc_normal(A, B, E),
|
||||
calc_normal(A, B, E),
|
||||
calc_normal(A, B, E),
|
||||
};
|
||||
BIN
src/input.o
Normal file
BIN
src/input.o
Normal file
Binary file not shown.
BIN
src/matrix.o
Normal file
BIN
src/matrix.o
Normal file
Binary file not shown.
BIN
src/mesh.o
Normal file
BIN
src/mesh.o
Normal file
Binary file not shown.
BIN
src/shader.o
Normal file
BIN
src/shader.o
Normal file
Binary file not shown.
BIN
src/texture.o
Normal file
BIN
src/texture.o
Normal file
Binary file not shown.
BIN
src/window.o
Normal file
BIN
src/window.o
Normal file
Binary file not shown.
Reference in New Issue
Block a user