source: nanovis/trunk/RenderVertexArray.h @ 4902

Last change on this file since 4902 was 3630, checked in by ldelgass, 11 years ago

Nanovis refactoring to fix problems with scaling and multiple results.
Do rendering in world space to properly place and scale multiple data sets.
Also fix flows to reduce resets of animations. More work toward removing
Cg dependency. Fix panning to convert viewport coords to world coords.

  • 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.