started work on (ps2) pipelines

This commit is contained in:
aap
2015-07-11 23:48:11 +02:00
parent 34f0e5550b
commit e9f638db05
17 changed files with 205 additions and 32 deletions

View File

@@ -4,11 +4,11 @@ OBJ = $(patsubst %.cpp, $(BUILDDIR)/%.o, $(SRC))
DEP = $(patsubst %.cpp, $(BUILDDIR)/%.d, $(SRC))
RWDIR=$(HOME)/src/librw
#LDLIBS=-pthread -lX11 -lXrandr -lXi -lXxf86vm -lGL -lGLEW -lm
#STATICLIBS= $(RWDIR)/librw-opengl.a /usr/local/lib/libglfw3.a
LDLIBS=-pthread -lX11 -lXrandr -lXi -lXxf86vm -lGL -lGLEW -lm
STATICLIBS= $(RWDIR)/librw-opengl.a /usr/local/lib/libglfw3.a
LDLIBS=-pthread -lGL -lGLEW -lglfw
STATICLIBS=$(RWDIR)/librw-opengl.a
#LDLIBS=-pthread -lGL -lGLEW -lglfw
#STATICLIBS=$(RWDIR)/librw-opengl.a
CFLAGS=-g -I$(RWDIR) -Wall -Wextra

View File

@@ -42,15 +42,16 @@ renderAtomic(rw::Atomic *atomic)
uint64 offset = 0;
for(uint32 i = 0; i < meshHeader->numMeshes; i++){
Mesh *mesh = &meshHeader->mesh[i];
Material *mat = mesh->material;
float color[4];
uint8 *col = mesh->material->color;
uint8 *col = mat->color;
color[0] = col[0] / 255.0f;
color[1] = col[1] / 255.0f;
color[2] = col[2] / 255.0f;
color[3] = col[3] / 255.0f;
glUniform4fv(glGetUniformLocation(program, "matColor"),
1, color);
rw::gl::Texture *tex =(rw::gl::Texture*)mesh->material->texture;
rw::gl::Texture *tex =(rw::gl::Texture*)mat->texture;
if(tex)
tex->bind(0);
else