VertexBufferObjectControlFileOBJ.hh 1.94 KB
Newer Older
Robert Menzel's avatar
Robert Menzel committed
1 2 3 4 5
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University         //
// All rights reserved.                                                       //
////////////////////////////////////////////////////////////////////////////////

6 7
#ifndef ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROLFILEOBJ_HH
#define ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROLFILEOBJ_HH
Robert Menzel's avatar
Robert Menzel committed
8

Robert Menzel's avatar
Robert Menzel committed
9 10
#include <ACGL/ACGL.hh>

Robert Menzel's avatar
Robert Menzel committed
11 12
#include <ACGL/Resource/FileController.hh>
#include <ACGL/Base/Settings.hh>
13
#include <ACGL/OpenGL/Objects/VertexBufferObject.hh>
Robert Menzel's avatar
Robert Menzel committed
14
#include <ACGL/OpenGL/GL.hh>
Robert Menzel's avatar
Robert Menzel committed
15 16

namespace ACGL{
Robert Menzel's avatar
Robert Menzel committed
17
namespace OpenGL{
Robert Menzel's avatar
Robert Menzel committed
18

19
class VertexBufferObjectControlFileOBJ : public Resource::FileController<VertexBufferObject>
Robert Menzel's avatar
Robert Menzel committed
20 21 22 23 24
{
    // ========================================================================================================= \/
    // ============================================================================================ CONSTRUCTORS \/
    // ========================================================================================================= \/
public:
25 26
    VertexBufferObjectControlFileOBJ(const std::string& _filename)
    :   Resource::FileController<VertexBufferObject>(_filename, Base::Settings::the()->getFullGeometryPath())
Robert Menzel's avatar
Robert Menzel committed
27
    {}
28
    virtual ~VertexBufferObjectControlFileOBJ() {}
Robert Menzel's avatar
Robert Menzel committed
29 30

private:
31
    bool loadOBJ(SharedVertexBufferObject& vertexBuffer);
Robert Menzel's avatar
Robert Menzel committed
32 33 34 35 36

    // ===================================================================================================== \/
    // ============================================================================================ OVERRIDE \/
    // ===================================================================================================== \/
public:
37 38
    virtual SharedVertexBufferObject create(void);
    virtual bool update(SharedVertexBufferObject& vertexBuffer);
Robert Menzel's avatar
Robert Menzel committed
39 40
};

Robert Menzel's avatar
Robert Menzel committed
41
} // OpenGL
Robert Menzel's avatar
Robert Menzel committed
42 43
} // ACGL

44
#endif // ACGL_OPENGL_CONTROLLER_VERTEXBUFFEROBJECTCONTROLFILEOBJ_HH