Fix checking barycentric coordinates
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#define SIZE 1200
|
||||
#define RESOURCE(NAME) "resources/" NAME
|
||||
|
||||
enum {
|
||||
TINY_EXIT_SUCCESS,
|
||||
TINY_EXIT_ARENA_INIT_FAILED,
|
||||
@@ -27,12 +30,12 @@ int main(void) {
|
||||
Colour teal = {.r = 14, .g = 156, .b = 208, .a = 255};
|
||||
Colour orange = {.r = 242, .g = 100, .b = 48, .a = 255};
|
||||
Render render;
|
||||
if (!init_render(arena, &render, 1200, 1200)) {
|
||||
if (!init_render(arena, &render, SIZE, SIZE)) {
|
||||
return TINY_EXIT_RENDER_INIT_FAILED;
|
||||
}
|
||||
|
||||
Model model =
|
||||
load_obj_file(arena, "resources/head.obj", "resources/head.pnm");
|
||||
load_obj_file(arena, RESOURCE("head.obj"), RESOURCE("head.pnm"));
|
||||
if (INVALID_MODEL(model)) {
|
||||
return TINY_EXIT_MODEL_LOAD_FAILED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user