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

Last change on this file since 2837 was 2837, checked in by ldelgass, 13 years ago

More misc. cleanups

  • 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-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
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 _bytes_per_component;
44};
45
46#endif
Note: See TracBrowser for help on using the repository browser.