mirror of
https://github.com/aap/librw.git
synced 2025-12-19 17:09:51 +00:00
started work on (ps2) pipelines
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user