Commit 82c5a51b authored by Robert Menzel's avatar Robert Menzel

VertexArrayObjectControlFile can load arbitrary meshes but will get marked deprecated soon

parent 181fc1ce
......@@ -22,16 +22,16 @@ namespace OpenGL{
class GeometryDataControlFileATB;
class GeometryDataControlFileOBJ : public ACGL::OpenGL::GeometryDataControlFile
class GeometryDataControlFileMesh : public ACGL::OpenGL::GeometryDataControlFile
{
friend void initStaticFileTypes(void);
friend class GeometryDataControlFileATB;
public:
GeometryDataControlFileOBJ(const std::string& _filename) : GeometryDataControlFile(_filename,Base::Settings::the()->getFullGeometryPath()) {}
virtual ~GeometryDataControlFileOBJ(void) {}
GeometryDataControlFileMesh(const std::string& _filename) : GeometryDataControlFile(_filename,Base::Settings::the()->getFullGeometryPath()) {}
virtual ~GeometryDataControlFileMesh(void) {}
// the entry point that gets registered in registerType()
static SharedGeometryDataControlFile creator(const std::string& _filename) { return SharedGeometryDataControlFile(new GeometryDataControlFileOBJ(_filename)); }
static SharedGeometryDataControlFile creator(const std::string& _filename) { return SharedGeometryDataControlFile(new GeometryDataControlFileMesh(_filename)); }
private:
virtual bool load(SharedGeometryData& geometry) const;
......@@ -39,13 +39,14 @@ private:
// register the file extension 'obj' for this loader
static ACGL::int_t registerType(void)
{
sTypeID = GeometryDataControlFileFactory::the()->registerType("obj", &GeometryDataControlFileOBJ::creator);
sTypeID = GeometryDataControlFileFactory::the()->registerType("obj", &GeometryDataControlFileMesh::creator);
sTypeID = GeometryDataControlFileFactory::the()->registerType("vap", &GeometryDataControlFileMesh::creator);
return sTypeID;
}
};
ACGL_SMARTPOINTER_TYPEDEFS(GeometryDataControlFileOBJ)
ACGL_SMARTPOINTER_TYPEDEFS(GeometryDataControlFileMesh)
} // OpenGL
} // ACGL
......
......@@ -21,9 +21,9 @@ using namespace ACGL::OpenGL;
using namespace ACGL::Utils;
using namespace ACGL::Base;
bool GeometryDataControlFileOBJ::load(SharedGeometryData& geometry) const
bool GeometryDataControlFileMesh::load(SharedGeometryData& geometry) const
{
geometry = loadGeometryDataFromOBJ(getFullFilePath());
geometry = loadGeometryData(getFullFilePath());
if (geometry)
return true;
else
......
......@@ -30,7 +30,7 @@ void ACGL::OpenGL::initStaticFileTypes(void)
//
// Geometry, Meshes, Vertex data
//
GeometryDataControlFileOBJ::registerType();
GeometryDataControlFileMesh::registerType();
GeometryDataControlFileATB::registerType();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment