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

Last change on this file since 2831 was 2831, checked in by ldelgass, 8 years ago

Refactor texture classes, misc. cleanups, cut down on header pollution -- still
need to fix header deps in Makefile.in

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
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 *
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 TEXTURE3D_H
17#define TEXTURE3D_H
18
19#include <GL/glew.h>
20
21class Texture3D
22{
23public:
24    Texture3D();
25
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);
31
32    ~Texture3D();
33
34    GLuint initialize(void *data);
35
36    void update(void *data);
37
38    void activate();
39
40    void deactivate();
41
42    static void check_max_size();
43
44    static void check_max_unit();
45
46    int width;
47    int height;
48    int depth;
49
50    double aspect_ratio_width;
51    double aspect_ratio_height;
52    double aspect_ratio_depth;
53
54    int n_components;
55
56    bool gl_resource_allocated;
57    GLuint id;
58    GLuint type;
59    GLuint interp_type;
60    //GLuint tex_unit;
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.