From: John Tsiombikas Date: Fri, 20 Nov 2009 02:45:19 +0000 (+0000) Subject: fixed multiple insertions of the same texture X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=33554a591c2639d20dc3ad94665ee09ae5d04a3d;p=summerhack fixed multiple insertions of the same texture --- diff --git a/3dengfx.conf b/3dengfx.conf index 0af8e71..7b57a19 100644 --- a/3dengfx.conf +++ b/3dengfx.conf @@ -4,7 +4,7 @@ ; tool) so your best bet would be using that tool to configure the demo. ; If that does not work for some reason, modify this file with care... -fullscreen = true +fullscreen = false resolution = 1024x768 bpp = dontcare zbuffer = dontcare diff --git a/Makefile b/Makefile index 4292695..459126d 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ -src := src/sumhack.cpp src/events.cpp -bin := sumhack-thelab +src = src/sumhack.cpp src/events.cpp +bin = sumhack-thelab include src/parts/Makefile-part include src/sdlvf/Makefile-part -obj := $(src:.cpp=.o) $(csrc:.c=.o) +obj = $(src:.cpp=.o) $(csrc:.c=.o) -opt := -O1 -opt := -g -CXXFLAGS := -ansi -pedantic -Wall $(opt) -Isrc/3dengfx/src `src/3dengfx/3dengfx-config --cflags` -CFLAGS := -std=c89 -pedantic -Wall $(opt) `src/3dengfx/3dengfx-config --cflags` -libs := src/3dengfx/lib3dengfx.a `src/3dengfx/3dengfx-config --libs-no-3dengfx` -lGL -lvorbisfile +opt = -O1 +opt = -g +CXXFLAGS = -ansi -pedantic -Wall $(opt) -Isrc/3dengfx/src `src/3dengfx/3dengfx-config --cflags` +CFLAGS = -std=c89 -pedantic -Wall $(opt) `src/3dengfx/3dengfx-config --cflags` +libs = src/3dengfx/lib3dengfx.a `src/3dengfx/3dengfx-config --libs-no-3dengfx` -lGL -lvorbisfile $(bin): $(obj) src/3dengfx/lib3dengfx.a data/tex_list $(CXX) -o $@ $(obj) $(libs) @@ -22,7 +22,7 @@ src/3dengfx/lib3dengfx.a: data/tex_list: $(src) tools/find_textures >$@ -include $(obj:.o=.d) +-include $(obj:.o=.d) %.d: %.cpp @set -e; rm -f $@; $(CXX) -MM $(CXXFLAGS) $< > $@.$$$$; \ diff --git a/src/parts/.dist.hpp.swp b/src/parts/.dist.hpp.swp deleted file mode 100644 index 8b934a2..0000000 Binary files a/src/parts/.dist.hpp.swp and /dev/null differ diff --git a/src/parts/.space.cpp.swp b/src/parts/.space.cpp.swp deleted file mode 100644 index 5429ac9..0000000 Binary files a/src/parts/.space.cpp.swp and /dev/null differ diff --git a/src/parts/pipes.cpp b/src/parts/pipes.cpp index ec45a28..c9e2b45 100644 --- a/src/parts/pipes.cpp +++ b/src/parts/pipes.cpp @@ -174,7 +174,6 @@ static void make_skycube(Scene *scene) { Material *mat = face[i]->get_material_ptr(); mat->emissive_color = 1.0; - add_texture(tex[i]); mat->set_texture(tex[i], TEXTYPE_DIFFUSE); face[i]->set_texture_addressing(TEXADDR_CLAMP); scene->add_object(face[i]); diff --git a/src/parts/space.cpp b/src/parts/space.cpp index 4bf9ba9..3339b5c 100644 --- a/src/parts/space.cpp +++ b/src/parts/space.cpp @@ -95,7 +95,6 @@ static void make_skycube(Scene *scene) { for(int i=0; i<6; i++) { Material *mat = face[i]->get_material_ptr(); mat->emissive_color = 1.0; - add_texture(tex[i]); mat->set_texture(tex[i], TEXTYPE_DIFFUSE); face[i]->set_texture_addressing(TEXADDR_CLAMP); scene->add_object(face[i]); diff --git a/src/parts/temple.cpp b/src/parts/temple.cpp index e2a58e1..5db2eca 100644 --- a/src/parts/temple.cpp +++ b/src/parts/temple.cpp @@ -139,7 +139,6 @@ static void make_skycube(Scene *scene) { for(int i=0; i<6; i++) { Material *mat = face[i]->get_material_ptr(); mat->emissive_color = 1.0; - add_texture(tex[i]); mat->set_texture(tex[i], TEXTYPE_DIFFUSE); face[i]->set_texture_addressing(TEXADDR_CLAMP); scene->add_object(face[i]);