source: trunk/packages/vizservers/nanovis/RenderVertexArray.h @ 3464

Last change on this file since 3464 was 3177, checked in by mmc, 7 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
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
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-2012  HUBzero Foundation, LLC
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
22class RenderVertexArray
23{
24public:
25    RenderVertexArray(int nverts, GLint size, GLenum type = GL_FLOAT);
26
27    ~RenderVertexArray();
28
29    void loadData(void *data);  // load vertex data from memory
30
31    void read(/*GLenum buffer,*/ int w, int h);   // read vertex data from
32                                                  // frame buffer
33    void setPointer(GLuint index);
34
35private:
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
43    int _bytesPerComponent;
44};
45
46#endif
Note: See TracBrowser for help on using the repository browser.