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

Last change on this file since 4906 was 4889, checked in by ldelgass, 9 years ago

Merge r3611:3618 from trunk

  • Property svn:eol-style set to native
File size: 1.4 KB
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[934]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 *
[3502]10 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
[934]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 */
[4889]16#ifndef NV_TEXTURE1D_H
17#define NV_TEXTURE1D_H
[934]18
19#include <GL/glew.h>
20
[4889]21namespace nv {
22
[2831]23class Texture1D
24{
[934]25public:
[2831]26    Texture1D();
[934]27
[2831]28    Texture1D(int width,
29              GLuint type = GL_FLOAT,
30              GLuint interp = GL_LINEAR,
31              int numComponents = 4,
32              void *data = NULL);
33
[934]34    ~Texture1D();
[2831]35
36    GLuint initialize(void *data);
37
38    void update(void *data);
39
[934]40    void activate();
[2831]41
[934]42    void deactivate();
[2831]43
[2857]44    int width() const
45    {
46        return _width;
47    }
48
49    GLuint id() const
50    {
51        return _id;
52    }
53
54    void setWrapS(GLuint wrapMode);
55
[2900]56    static void checkMaxSize();
[2831]57
[2900]58    static void checkMaxUnit();
[2831]59
[2857]60private:
61    int _width;
[2831]62
[2857]63    int _numComponents;
[2831]64
[2857]65    bool _glResourceAllocated;
66    GLuint _id;
67    GLuint _type;
68    GLuint _interpType;
69    GLuint _wrapS;
[934]70};
71
[4889]72}
73
[934]74#endif
Note: See TracBrowser for help on using the repository browser.