Last change
on this file since 3464 was
3177,
checked in by mmc, 12 years ago
|
Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2798] | 1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
[953] | 2 | /* |
---|
| 3 | * ---------------------------------------------------------------------- |
---|
| 4 | * Render to vertex array class |
---|
| 5 | * |
---|
| 6 | * ====================================================================== |
---|
| 7 | * AUTHOR: Wei Qiao <qiaow@purdue.edu> |
---|
| 8 | * Purdue Rendering and Perceptualization Lab (PURPL) |
---|
| 9 | * |
---|
[3177] | 10 | * Copyright (c) 2004-2012 HUBzero Foundation, LLC |
---|
[953] | 11 | * |
---|
| 12 | * See the file "license.terms" for information on usage and |
---|
| 13 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
| 14 | * ====================================================================== |
---|
| 15 | */ |
---|
| 16 | #ifndef RENDERVERTEXARRAY_H |
---|
| 17 | #define RENDERVERTEXARRAY_H |
---|
| 18 | |
---|
| 19 | #include <GL/glew.h> |
---|
| 20 | #include <GL/gl.h> |
---|
| 21 | |
---|
[2837] | 22 | class RenderVertexArray |
---|
| 23 | { |
---|
[953] | 24 | public: |
---|
| 25 | RenderVertexArray(int nverts, GLint size, GLenum type = GL_FLOAT); |
---|
[2837] | 26 | |
---|
[953] | 27 | ~RenderVertexArray(); |
---|
| 28 | |
---|
[2921] | 29 | void loadData(void *data); // load vertex data from memory |
---|
[2837] | 30 | |
---|
[2921] | 31 | void read(/*GLenum buffer,*/ int w, int h); // read vertex data from |
---|
[953] | 32 | // frame buffer |
---|
[2921] | 33 | void setPointer(GLuint index); |
---|
[2837] | 34 | |
---|
| 35 | private: |
---|
| 36 | GLenum _usage; // vbo usage flag |
---|
| 37 | GLuint _buffer; |
---|
| 38 | GLuint _index; |
---|
| 39 | GLuint _nverts; |
---|
| 40 | GLint _size; // size of attribute |
---|
| 41 | GLenum _format; // readpixels image format |
---|
| 42 | GLenum _type; // FLOAT or HALF_FLOAT |
---|
[2921] | 43 | int _bytesPerComponent; |
---|
[953] | 44 | }; |
---|
| 45 | |
---|
| 46 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.