parent
1c613ca59c
commit
c65e215a5a
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
CC = g++
|
||||
AR = ar
|
||||
OBJECTS = punkt3d.o punkt2d.o emath.o emath_opengl.o glcolor.o gldrawhelper.o glfontengine.o glrect.o gltexture.o matrix.o quaternion.o rotationsmatrix.o glsdlscreen.o sdlfuncs.o fpsmanager.o glcamera.o catmullromspline.o extstring.o
|
||||
OBJECTS = punkt3d.o punkt2d.o emath.o emath_opengl.o glcolor.o gldrawhelper.o glfontengine.o glrect.o gltexture.o matrix.o quaternion.o rotationsmatrix.o glsdlscreen.o sdlfuncs.o fpsmanager.o glcamera.o catmullromspline.o extstring.o quader.o
|
||||
OBJOPT = -Wall -c `sdl-config --cflags`
|
||||
SUBDIRS = glgui glmenu model
|
||||
SUBDIROBJECTS = glgui/*.o glmenu/*.o model/*.o
|
||||
|
|
|
@ -151,3 +151,8 @@ void Model::render() {
|
|||
Model::~Model() {
|
||||
unload();
|
||||
}
|
||||
|
||||
const Punkt3D* Model::getMeshData(unsigned int *meshanz) {
|
||||
*meshanz = meshdataanz;
|
||||
return (const Punkt3D*)meshdata;
|
||||
}
|
||||
|
|
|
@ -84,6 +84,8 @@ class Model {
|
|||
|
||||
Quader getBoundingBox() { return boundingbox; }
|
||||
float getBoundingRadius() { return boundingrad; }
|
||||
|
||||
const Punkt3D* getMeshData(unsigned int *meshanz);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -11,6 +11,7 @@ class Modelloader {
|
|||
std::string filename;
|
||||
public:
|
||||
Modelloader(std::string _filename);
|
||||
virtual ~Modelloader() { };
|
||||
virtual bool load(Model *m)=0;
|
||||
};
|
||||
|
||||
|
|
27
quader.cpp
27
quader.cpp
|
@ -6,5 +6,30 @@ void Quader::clean() {
|
|||
}
|
||||
|
||||
void Quader::render() {
|
||||
glB
|
||||
glBegin(GL_LINES);
|
||||
glVertexP3D(a);
|
||||
glVertexP3D(b);
|
||||
glVertexP3D(b);
|
||||
glVertexP3D(c);
|
||||
glVertexP3D(c);
|
||||
glVertexP3D(d);
|
||||
glVertexP3D(d);
|
||||
glVertexP3D(a);
|
||||
glVertexP3D(e);
|
||||
glVertexP3D(f);
|
||||
glVertexP3D(f);
|
||||
glVertexP3D(g);
|
||||
glVertexP3D(g);
|
||||
glVertexP3D(h);
|
||||
glVertexP3D(h);
|
||||
glVertexP3D(e);
|
||||
glVertexP3D(a);
|
||||
glVertexP3D(e);
|
||||
glVertexP3D(b);
|
||||
glVertexP3D(f);
|
||||
glVertexP3D(c);
|
||||
glVertexP3D(g);
|
||||
glVertexP3D(d);
|
||||
glVertexP3D(h);
|
||||
glEnd();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue