source:
nanovis/branches/1.1/RenderVertexArray.h
@
4889
Last change on this file since 4889 was 4889, checked in by ldelgass, 9 years ago | |
---|---|
|
|
File size: 922 bytes |
Rev | Line | |
---|---|---|
[2798] | 1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
[953] | 2 | /* |
[4889] | 3 | * Copyright (c) 2004-2013 HUBzero Foundation, LLC |
[953] | 4 | * |
[4889] | 5 | * Author: |
6 | * Wei Qiao <qiaow@purdue.edu> | |
[953] | 7 | */ |
[4889] | 8 | #ifndef NV_RENDERVERTEXARRAY_H |
9 | #define NV_RENDERVERTEXARRAY_H | |
[953] | 10 | |
11 | #include <GL/glew.h> | |
12 | #include <GL/gl.h> | |
13 | ||
[4889] | 14 | namespace nv { |
15 | ||
[2837] | 16 | class RenderVertexArray |
17 | { | |
[953] | 18 | public: |
19 | RenderVertexArray(int nverts, GLint size, GLenum type = GL_FLOAT); | |
[2837] | 20 | |
[953] | 21 | ~RenderVertexArray(); |
22 | ||
[2921] | 23 | void loadData(void *data); // load vertex data from memory |
[2837] | 24 | |
[2921] | 25 | void read(/*GLenum buffer,*/ int w, int h); // read vertex data from |
[953] | 26 | // frame buffer |
[2921] | 27 | void setPointer(GLuint index); |
[2837] | 28 | |
29 | private: | |
30 | GLenum _usage; // vbo usage flag | |
31 | GLuint _buffer; | |
32 | GLuint _index; | |
33 | GLuint _nverts; | |
34 | GLint _size; // size of attribute | |
35 | GLenum _format; // readpixels image format | |
36 | GLenum _type; // FLOAT or HALF_FLOAT | |
[2921] | 37 | int _bytesPerComponent; |
[953] | 38 | }; |
39 | ||
[4889] | 40 | } |
41 | ||
[953] | 42 | #endif |
Note: See TracBrowser
for help on using the repository browser.