source: nanovis/branches/1.1/RenderVertexArray.h @ 5722

Last change on this file since 5722 was 4904, checked in by ldelgass, 9 years ago

Merge serveral changes from trunk. Does not include threading, world space
changes, etc.

  • Property svn:eol-style set to native
File size: 893 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 * Author:
6 *   Wei Qiao <qiaow@purdue.edu>
7 */
8#ifndef NV_RENDERVERTEXARRAY_H
9#define NV_RENDERVERTEXARRAY_H
10
11#include <GL/glew.h>
12#include <GL/gl.h>
13
14namespace nv {
15
16class RenderVertexArray
17{
18public:
19    RenderVertexArray(int nverts, GLint size, GLenum type = GL_FLOAT);
20
21    ~RenderVertexArray();
22
23    void loadData(void *data);  // load vertex data from memory
24
25    void read(int w, int h);   // read vertex data from frame buffer
26
27    void setPointer(GLuint index);
28
29private:
30    GLenum _usage;     // vbo usage flag
31    GLuint _buffer;
32    GLuint _index;
33    GLuint _nverts;
34    GLint _size;       // size of attribute       
35    GLenum _format;    // readpixels image format
36    GLenum _type;      // FLOAT or HALF_FLOAT
37    int _bytesPerComponent;
38};
39
40}
41
42#endif
Note: See TracBrowser for help on using the repository browser.