add TextureLoader, FileLoader submodules; update to compile again

This commit is contained in:
Josh Holtrop committed 2011-03-08 13:40:29 -05:00
1 parent f04947830e
commit 4d873b1296
8 files changed
+26 -8

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
[submodule "wfobj"]
path = wfobj
url = ../wfobj
[submodule "FileLoader"]
path = FileLoader
url = ../FileLoader.git
[submodule "TextureLoader"]
path = TextureLoader
url = ../TextureLoader.git
Submodule
+1
Submodule FileLoader added at 8abf3ff02b.
+1 -1
View File
@@ -13,7 +13,7 @@ else
GLLIBS := -lGL -lGLU
endif
export CXXFLAGS := -O2 $(shell sdl-config --cflags)
export CXXFLAGS := -O2 $(shell sdl-config --cflags) -I$(CURDIR)
LDFLAGS := $(GLLIBS) $(WINDOWSLIBS) $(shell sdl-config --libs) -lSDL_image
TARGET := wfobj-view
+1 -1
View File
@@ -4,7 +4,7 @@
#include <GL/gl.h>
#include <GL/glu.h>
#include <iostream>
#include "TextureCache.hh"
#include "TextureCache.h"
using namespace std;
GLuint TextureCache::load(const string & filename)
File renamed without changes.
Submodule
+1
Submodule TextureLoader added at 9855d3e577.
Submodule
+1
Submodule wfobj added at b714c0b08f.
+12 -6
View File
@@ -4,8 +4,8 @@
#include <GL/gl.h>
#include <GL/glu.h>
#include <iostream>
#include "wfobj/WFObj.hh"
#include "TextureCache/TextureCache.hh"
#include "wfobj/WFObj.h"
#include "TextureCache/TextureCache.h"
using namespace std;
/* Some definitions */
@@ -15,10 +15,15 @@ using namespace std;
TextureCache textureCache;
GLuint loadTexture(const char * filename)
class LoadTexture : public TextureLoader
{
return textureCache.load(filename);
public:
GLuint load(const FileLoader::Path & path,
FileLoader & fl, bool mipmaps, int mode, int quality)
{
return textureCache.load(path.fullPath);
}
};
class Viewer
{
@@ -31,7 +36,6 @@ private:
void display();
void setProjection();
WFObj m_obj;
GLuint m_list;
float m_rotationMatrix[16];
int m_startx, m_starty;
@@ -76,7 +80,9 @@ Viewer::Viewer(const char * filename)
{
m_dist = 5.0;
m_dragging = false;
m_obj.load(filename, &loadTexture);
LoadTexture lt;
WFObj m_obj(lt);
m_obj.load(FileLoader::Path(filename, ""));
m_list = m_obj.render();
/* Print out the object's size */