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

Last change on this file since 3464 was 3362, checked in by ldelgass, 11 years ago

Merge nanovis2 branch to trunk

  • Property svn:eol-style set to native
File size: 1.7 KB
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[1359]2/*
3 * ----------------------------------------------------------------------
4 * texture3d.h: 3d texture class
5 *
6 * ======================================================================
7 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
8 *           Purdue Rendering and Perceptualization Lab (PURPL)
9 *
[3177]10 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
[1359]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 */
[2831]16#ifndef TEXTURE3D_H
17#define TEXTURE3D_H
[1359]18
19#include <GL/glew.h>
20
[2831]21class Texture3D
22{
[1359]23public:
[2831]24    Texture3D();
[1359]25
[2831]26    Texture3D(int width, int height, int depth,
27              GLuint type = GL_FLOAT,
28              GLuint interp = GL_LINEAR,
29              int numComponents = 4,
30              void *data = NULL);
[1359]31
[2831]32    ~Texture3D();
[1359]33
[2831]34    GLuint initialize(void *data);
[1359]35
[2831]36    void update(void *data);
[1359]37
[2831]38    void activate();
[1359]39
[2831]40    void deactivate();
41
[2857]42    int width() const
43    {
44        return _width;
45    }
46
47    int height() const
48    {
49        return _width;
50    }
51
52    int depth() const
53    {
54        return _width;
55    }
56
57    GLuint id() const
58    {
59        return _id;
60    }
61
62    void setWrapS(GLuint wrapMode);
63
64    void setWrapT(GLuint wrapMode);
65
66    void setWrapR(GLuint wrapMode);
67
[2900]68    static void checkMaxSize();
[2831]69
[2900]70    static void checkMaxUnit();
[2831]71
[2857]72private:
73    int _width;
74    int _height;
75    int _depth;
[2831]76
[2857]77    int _numComponents;
[2831]78
[2857]79    bool _glResourceAllocated;
80    GLuint _id;
81    GLuint _type;
82    GLuint _interpType;
83    GLuint _wrapS;
84    GLuint _wrapT;
85    GLuint _wrapR;
[1359]86};
87
88#endif
Note: See TracBrowser for help on using the repository browser.