source: nanovis/branches/1.1/Texture1D.h @ 4804

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

Add basic VTK structured points reader to nanovis, update copyright dates.

  • 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 * Texture1D.h: 1d texture 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 TEXTURE1D_H
17#define TEXTURE1D_H
18
19#include <GL/glew.h>
20
21class Texture1D
22{
23public:
24    Texture1D();
25
26    Texture1D(int width,
27              GLuint type = GL_FLOAT,
28              GLuint interp = GL_LINEAR,
29              int numComponents = 4,
30              void *data = NULL);
31
32    ~Texture1D();
33
34    GLuint initialize(void *data);
35
36    void update(void *data);
37
38    void activate();
39
40    void deactivate();
41
42    int width() const
43    {
44        return _width;
45    }
46
47    GLuint id() const
48    {
49        return _id;
50    }
51
52    void setWrapS(GLuint wrapMode);
53
54    static void checkMaxSize();
55
56    static void checkMaxUnit();
57
58private:
59    int _width;
60
61    int _numComponents;
62
63    bool _glResourceAllocated;
64    GLuint _id;
65    GLuint _type;
66    GLuint _interpType;
67    GLuint _wrapS;
68};
69
70#endif
Note: See TracBrowser for help on using the repository browser.