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

Last change on this file since 3611 was 3611, checked in by ldelgass, 7 years ago

Use nv namespace for classes in nanovis rather than prefixing class names with
Nv (still need to convert shader classes).

  • 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-2013  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
22namespace nv {
23
24class RenderVertexArray
25{
26public:
27    RenderVertexArray(int nverts, GLint size, GLenum type = GL_FLOAT);
28
29    ~RenderVertexArray();
30
31    void loadData(void *data);  // load vertex data from memory
32
33    void read(/*GLenum buffer,*/ int w, int h);   // read vertex data from
34                                                  // frame buffer
35    void setPointer(GLuint index);
36
37private:
38    GLenum _usage;     // vbo usage flag
39    GLuint _buffer;
40    GLuint _index;
41    GLuint _nverts;
42    GLint _size;       // size of attribute       
43    GLenum _format;    // readpixels image format
44    GLenum _type;      // FLOAT or HALF_FLOAT
45    int _bytesPerComponent;
46};
47
48}
49
50#endif
Note: See TracBrowser for help on using the repository browser.