~gimaker/peekabot/coord-sys-default

« back to all changes in this revision

Viewing changes to src/renderer/api/VertexBasedProxy.hh

  • Committer: Staffan Gimåker
  • Date: 2009-06-29 10:09:26 UTC
  • mfrom: (665.1.39 renderer-redux)
  • Revision ID: staffan@gimaker.se-20090629100926-ju5kx8jwzy422rwu
Merged the renderer-redux branch.

This represents a major overhaul to the rendering engine, with a less contrived
design and better performance. Both memory and CPU utilization should be 
better in general.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright Staffan Gimåker 2008-2009.
 
3
 *
 
4
 * ---
 
5
 *
 
6
 * This file is part of peekabot.
 
7
 *
 
8
 * peekabot is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2 of the License, or
 
11
 * (at your option) any later version.
 
12
 *
 
13
 * peekabot is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#ifndef PEEKABOT_RENDERER_API_VERTEX_BASED_PROXY_HH_INCLUDED
 
23
#define PEEKABOT_RENDERER_API_VERTEX_BASED_PROXY_HH_INCLUDED
 
24
 
 
25
 
 
26
#include <vector>
 
27
 
 
28
#include "../../Vector.hh"
 
29
#include "ObjectEntityProxy.hh"
 
30
 
 
31
 
 
32
namespace peekabot
 
33
{
 
34
    namespace renderer
 
35
    {
 
36
        namespace api
 
37
        {
 
38
            class VertexBasedProxy : virtual public ObjectEntityProxy
 
39
            {
 
40
            public:
 
41
                typedef std::vector<Vector3f> Vertices;
 
42
 
 
43
                void set_vertices(const Vertices &verts);
 
44
 
 
45
                void add_vertices(const Vertices &verts);
 
46
 
 
47
                void clear_vertices();
 
48
 
 
49
                //void overwrite(size_t pos, const Vertices &verts);
 
50
 
 
51
            protected:
 
52
                VertexBasedProxy(Renderer &renderer);
 
53
            };
 
54
        }
 
55
    }
 
56
}
 
57
 
 
58
 
 
59
#endif // PEEKABOT_RENDERER_API_VERTEX_BASED_PROXY_HH_INCLUDED