source: nanovis/trunk/graphics/Geometry.h @ 4897

Last change on this file since 4897 was 3465, checked in by ldelgass, 11 years ago

Rename R2 library to nv::graphics and nv::util.

  • Property svn:eol-style set to native
File size: 930 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 */
5#ifndef NV_GRAPHICS_GEOMETRY_H
6#define NV_GRAPHICS_GEOMETRY_H
7
8#include <GL/glew.h>
9
10#include <graphics/VertexBuffer.h>
11#include <graphics/IndexBuffer.h>
12
13namespace nv {
14namespace graphics {
15
16class Geometry
17{
18public:
19    enum {
20        LINES = GL_LINES,
21        LINE_STRIP = GL_LINE_STRIP,
22        TRIANGLES = GL_TRIANGLES,
23        TRIANGLE_STRIP = GL_TRIANGLE_STRIP,
24        QUADS = GL_QUADS
25    };
26
27    Geometry(int primitive, VertexBuffer *vertexBuffer,
28             IndexBuffer *indexBuffer);
29    Geometry(int primitive, VertexBuffer *pointBuffer,
30             VertexBuffer *colorBuffer, IndexBuffer *indexBuffer);
31    ~Geometry();
32
33    void render();
34
35private:
36    VertexBuffer *_vertexBuffer;
37    VertexBuffer *_colorBuffer;
38    IndexBuffer *_indexBuffer;
39    int _primitiveType;
40};
41
42}
43}
44
45#endif
Note: See TracBrowser for help on using the repository browser.