VertexArrayObjectLoadStore.cc 938 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/***********************************************************************
 * 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/VertexArrayObjectLoadStore.hh>
#include <ACGL/OpenGL/Data/ArrayBufferLoadStore.hh>

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

namespace ACGL{
namespace OpenGL{

SharedVertexArrayObject loadVertexArrayObject(const std::string& _filename)
{
    SharedArrayBuffer ab = loadArrayBuffer(_filename);
20
21
22
23
24
25
26
27
28
29
    if(ab)
    {
        SharedVertexArrayObject vao(new VertexArrayObject);
        vao->attachAllAttributes(ab);
        return vao;
    }
    else
    {
        return SharedVertexArrayObject();
    }
30
31
32
33
}

}
}