GeometryDataLoadStore.cc 1.35 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/***********************************************************************
 * Copyright 2011-2012 Computer Graphics Group RWTH Aachen University. *
 * All rights reserved.                                                *
 * Distributed under the terms of the MIT License (see LICENSE.TXT).   *
 **********************************************************************/

#include <ACGL/OpenGL/Data/GeometryDataLoadStore.hh>
//#include <ACGL/OpenGL/Tools.hh>
#include <ACGL/Base/FileHelpers.hh>
//#include <ACGL/Utils/Memory.hh>

using namespace ACGL;
using namespace ACGL::OpenGL;
using namespace ACGL::Utils;

namespace ACGL{
namespace OpenGL{

///////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                               generic load/save
///////////////////////////////////////////////////////////////////////////////////////////////////

SharedGeometryData loadGeometryData(const std::string& _filename)
{
    // lower case file ending:
    std::string fileEnding = Base::FileHelpers::getFileEnding(_filename);

    if (fileEnding == "obj")
    {
        return loadGeometryDataFromOBJ(_filename);
    }
    else
    {
34
        error() << "geometry file format of " << _filename << " not supported" << std::endl;
35
36
37
38
39
40
41
    }

    return SharedGeometryData();
}

} // OpenGL
} // ACGL