]> git.lizzy.rs Git - shadowclad.git/commitdiff
Change more things to test crossbuilding (no luck yet)
authoroutfrost <kotlet.bahn@gmail.com>
Mon, 1 Jun 2020 00:01:30 +0000 (02:01 +0200)
committeroutfrost <kotlet.bahn@gmail.com>
Mon, 1 Jun 2020 00:01:30 +0000 (02:01 +0200)
Makefile
src/engine/render.c
src/engine/tga.c

index 754b2385e77cf810a46d64c9fc16b3f1c516e8a3..de4459894974ab14f79ba7b609fe481de0435b2f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ SRCDIR ?= src
 CPPFLAGS ::= -iquotesrc/ $(CPPFLAGS)
 CFLAGS ::= -g -std=c99 -Wall -Wextra -Wpedantic -Werror $(CFLAGS)
 LDFLAGS ::= $(LDFLAGS)
-LDLIBS ::= -lGL -lGLEW -lglut -lassimp $(LDLIBS)
+LDLIBS ::= -L/usr/x86_64-w64-mingw32/bin -lopengl32 -lglew32 -lfreeglut -lassimp $(LDLIBS)
 
 # ######
 # Paths
@@ -50,7 +50,7 @@ binary ::= $(BUILDDIR)/shadowclad.exe
 $(binary): $(objects)
        @mkdir -p $(@D)
        @echo "Linking executable"
-       @$(CC) $(LDFLAGS) -o $(binary) $^ $(LOADLIBES) $(LDLIBS)
+       $(CC) $(LDFLAGS) -o $(binary) $^ $(LOADLIBES) $(LDLIBS)
 
 # Build C translation units
 $(objects): $(BUILDDIR)/%.c.o: %.c $(BUILDDIR)/%.c.mk
index 8e5133a9182f319e638785d3d552fde6df456dd1..0281087656c264b66e800efe7fd69e31b50136e3 100644 (file)
@@ -2,6 +2,9 @@
 
 #include <stdbool.h>
 #include <GL/freeglut_std.h>
+#define  GL_GLEXT_PROTOTYPES
+#include <GL/glext.h>
+#undef GL_GLEXT_PROTOTYPES
 
 #include "geometry.h"
 #include "performance.h"
@@ -63,7 +66,7 @@ static void renderScene(const Scene* scene, const Transform baseTransform) {
        Transform transform = multiply(scene->transform, baseTransform);
 
        glMatrixMode(GL_MODELVIEW);
-       glLoadTransposeMatrixf((const GLfloat*) &transform);
+       glLoadMatrixf((const GLfloat*) &transform);
 
        glDisable(GL_LIGHTING);
        drawAxes();
index 430fab7f8f22833dedf59c4f6f1238bd4e7bf4fd..53ff29a2ee77ad86b750ba6f4bf5f1ee20a59e0f 100644 (file)
@@ -3,6 +3,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <GL/glext.h>
+
 TgaImage* readTga(const char* path) {
        FILE* tgaFile = fopen(path, "rb");
        if (tgaFile == NULL) {