Last change
on this file since 5722 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:
913 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_VERTEXBUFFER_H |
---|
6 | #define NV_GRAPHICS_VERTEXBUFFER_H |
---|
7 | |
---|
8 | namespace nv { |
---|
9 | namespace graphics { |
---|
10 | |
---|
11 | class VertexBuffer |
---|
12 | { |
---|
13 | public: |
---|
14 | enum { |
---|
15 | POSITION3 = 0x01, |
---|
16 | NORMAL3 = 0x02, |
---|
17 | COLOR3 = 0x04, |
---|
18 | COLOR4 = 0x08 |
---|
19 | }; |
---|
20 | |
---|
21 | VertexBuffer(int type, int vertexCount, |
---|
22 | int byteSize, void *data, bool copy = true); |
---|
23 | |
---|
24 | ~VertexBuffer(); |
---|
25 | |
---|
26 | unsigned int getGraphicObjectID() const; |
---|
27 | |
---|
28 | void updateBuffer(void *data); |
---|
29 | |
---|
30 | int getVertexCount() const; |
---|
31 | |
---|
32 | void *_data; |
---|
33 | |
---|
34 | private: |
---|
35 | unsigned int _graphicObjectID; |
---|
36 | int _byteSize; |
---|
37 | int _vertexCount; |
---|
38 | }; |
---|
39 | |
---|
40 | inline int VertexBuffer::getVertexCount() const |
---|
41 | { |
---|
42 | return _vertexCount; |
---|
43 | } |
---|
44 | |
---|
45 | inline unsigned int VertexBuffer::getGraphicObjectID() const |
---|
46 | { |
---|
47 | return _graphicObjectID; |
---|
48 | } |
---|
49 | |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.