Line | |
---|
1 | |
---|
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 | * |
---|
10 | * Copyright (c) 2004-2006 Purdue Research Foundation |
---|
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 | |
---|
22 | class RenderVertexArray { |
---|
23 | GLenum m_usage; // vbo usage flag |
---|
24 | GLuint m_buffer; |
---|
25 | GLuint m_index; |
---|
26 | GLuint m_nverts; |
---|
27 | GLint m_size; // size of attribute |
---|
28 | GLenum m_format; // readpixels image format |
---|
29 | GLenum m_type; // FLOAT or HALF_FLOAT |
---|
30 | int m_bytes_per_component; |
---|
31 | |
---|
32 | public: |
---|
33 | RenderVertexArray(int nverts, GLint size, GLenum type = GL_FLOAT); |
---|
34 | ~RenderVertexArray(); |
---|
35 | |
---|
36 | void LoadData(void *data); // load vertex data from memory |
---|
37 | void Read(/*GLenum buffer,*/ int w, int h); // read vertex data from |
---|
38 | // frame buffer |
---|
39 | void SetPointer(GLuint index); |
---|
40 | }; |
---|
41 | |
---|
42 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.