Last change
on this file since 425 was
226,
checked in by mmc, 19 years ago
|
- Added code for Wei's visualization server.
- Fixed the energyLevels widget so that it doesn't barf when the
user attempts to download its contents.
|
File size:
1.3 KB
|
Line | |
---|
1 | /*
|
---|
2 | * ----------------------------------------------------------------------
|
---|
3 | * Render to vertex array class
|
---|
4 | *
|
---|
5 | * ======================================================================
|
---|
6 | * AUTHOR: Wei Qiao <qiaow@purdue.edu>
|
---|
7 | * Purdue Rendering and Perceptualization Lab (PURPL)
|
---|
8 | *
|
---|
9 | * Copyright (c) 2004-2006 Purdue Research Foundation
|
---|
10 | *
|
---|
11 | * See the file "license.terms" for information on usage and
|
---|
12 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
---|
13 | * ======================================================================
|
---|
14 | */
|
---|
15 | #ifndef RENDERVERTEXARRAY_H
|
---|
16 | #define RENDERVERTEXARRAY_H
|
---|
17 |
|
---|
18 | #include <GL/glew.h>
|
---|
19 | #include <GL/gl.h>
|
---|
20 |
|
---|
21 | class RenderVertexArray {
|
---|
22 | public:
|
---|
23 | RenderVertexArray(int nverts, GLint size, GLenum type = GL_FLOAT);
|
---|
24 | ~RenderVertexArray();
|
---|
25 |
|
---|
26 | void LoadData(void *data); // load vertex data from memory
|
---|
27 | void Read(/*GLenum buffer,*/ int w, int h); // read vertex data from frame buffer
|
---|
28 | void SetPointer(GLuint index);
|
---|
29 |
|
---|
30 | private:
|
---|
31 | GLenum m_usage; // vbo usage flag
|
---|
32 | GLuint m_buffer;
|
---|
33 | GLuint m_index;
|
---|
34 | GLuint m_nverts;
|
---|
35 | GLint m_size; // size of attribute
|
---|
36 | GLenum m_format; // readpixels image format
|
---|
37 | GLenum m_type; // FLOAT or HALF_FLOAT
|
---|
38 | int m_bytes_per_component;
|
---|
39 | };
|
---|
40 |
|
---|
41 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.