t
This commit is contained in:
parent
a350083bec
commit
b49c2b36c9
9
Makefile
9
Makefile
|
@ -9,7 +9,7 @@ endif
|
||||||
|
|
||||||
UNAME_P != uname -m
|
UNAME_P != uname -m
|
||||||
|
|
||||||
CCACHE = ccache
|
CCACHE = #ccache
|
||||||
|
|
||||||
#CC specifies which compiler we're using
|
#CC specifies which compiler we're using
|
||||||
CC = $(CCACHE) tcc
|
CC = $(CCACHE) tcc
|
||||||
|
@ -83,8 +83,7 @@ WARNING_FLAGS = -Wno-everything#-Wall -Wextra -Wwrite-strings -Wno-unused-parame
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
COMPILER_FLAGS = $(includeflag) -I/usr/local/include -g -O0 $(WARNING_FLAGS) -MD -c $< -o $@
|
COMPILER_FLAGS = $(includeflag) -I/usr/local/include -g -O0 -MD $(WARNING_FLAGS) -c $< -o $@
|
||||||
#-D_POSIX_C_SOURCE=1993809L
|
|
||||||
|
|
||||||
LIBPATH = -L./bin -L/usr/local/lib -L/usr/local/lib/tcc
|
LIBPATH = -L./bin -L/usr/local/lib -L/usr/local/lib/tcc
|
||||||
|
|
||||||
|
@ -104,9 +103,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ELIBS != $(call prefix, $(ELIBS), -l)
|
ELIBS != $(call prefix, $(ELIBS), -l)
|
||||||
#CLIBS != $(call prefix, $(CLIBS), -l)
|
|
||||||
|
|
||||||
#LELIBS = -Wl,-Bstatic $(ELIBS)# -Wl,-Bdynamic $(CLIBS)
|
|
||||||
LELIBS = $(ELIBS) $(CLIBS)
|
LELIBS = $(ELIBS) $(CLIBS)
|
||||||
|
|
||||||
objects = $(bsobjects) $(eobjects) $(pinobjects)
|
objects = $(bsobjects) $(eobjects) $(pinobjects)
|
||||||
|
@ -169,4 +166,4 @@ tags: $(ALLFILES)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo Cleaning project
|
@echo Cleaning project
|
||||||
@find $(BIN) -type f -delete
|
@find $(BIN) -type f -delete
|
||||||
|
|
|
@ -25,6 +25,7 @@ extern "C" {
|
||||||
#ifndef MATHC_H
|
#ifndef MATHC_H
|
||||||
#define MATHC_H
|
#define MATHC_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
||||||
// CONFIG
|
// CONFIG
|
||||||
|
|
|
@ -15,7 +15,7 @@ void DrawMesh(struct mMesh *mesh, struct mShader *shader)
|
||||||
uint32_t normalNr = 1;
|
uint32_t normalNr = 1;
|
||||||
uint32_t heightNr = 1;
|
uint32_t heightNr = 1;
|
||||||
|
|
||||||
for (uint32_t i = 0; i < (mesh->te - mesh->textures); i++) {
|
for (int i = 0; i < (mesh->te - mesh->textures); i++) {
|
||||||
glActiveTexture(GL_TEXTURE0 + i); // active proper texture unit before binding
|
glActiveTexture(GL_TEXTURE0 + i); // active proper texture unit before binding
|
||||||
// retrieve texture number (the N in diffuse_textureN)
|
// retrieve texture number (the N in diffuse_textureN)
|
||||||
char number = 0;
|
char number = 0;
|
||||||
|
|
|
@ -59,7 +59,7 @@ void draw_model(struct mModel *model, struct mShader *shader)
|
||||||
{
|
{
|
||||||
if (lastRendered != model) {
|
if (lastRendered != model) {
|
||||||
lastRendered = model;
|
lastRendered = model;
|
||||||
for (uint32_t i = 0; i < (model->mp - model->meshes); i++)
|
for (int i = 0; i < (model->mp - model->meshes); i++)
|
||||||
DrawMesh(&model->meshes[i], shader);
|
DrawMesh(&model->meshes[i], shader);
|
||||||
} else {
|
} else {
|
||||||
for (uint32_t i = 0; i < (model->mp - model->meshes); i++)
|
for (uint32_t i = 0; i < (model->mp - model->meshes); i++)
|
||||||
|
|
|
@ -83,7 +83,7 @@ struct mSkybox *MakeSkybox(const char *cubemap)
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, newskybox->id);
|
glBindTexture(GL_TEXTURE_CUBE_MAP, newskybox->id);
|
||||||
/*char buf[100] = { '\0' };*/
|
/*char buf[100] = { '\0' };*/
|
||||||
|
|
||||||
for (unsigned int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
/*
|
/*
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
strcat(buf, cubemap);
|
strcat(buf, cubemap);
|
||||||
|
|
Loading…
Reference in a new issue