source: trunk/packages/vizservers/nanovis/Texture1D.h @ 2825

Last change on this file since 2825 was 2798, checked in by ldelgass, 13 years ago

Add emacs mode magic line in preparation for indentation cleanup

  • Property svn:eol-style set to native
File size: 1.1 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-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 _TEXTURE_1D_H_
17#define _TEXTURE_1D_H_
18
19#include <GL/glew.h>
20
21class Texture1D {
22public:
23    int width;
24    bool gl_resource_allocated;
25   
26    GLuint type;
27    GLuint id;
28    GLuint tex_unit;
29
30    Texture1D();
31    Texture1D(int length, int type = GL_UNSIGNED_BYTE);
32    ~Texture1D();
33       
34    void activate();
35    void deactivate();
36    GLuint initialize_float_rgba(float* data);
37    void update_float_rgba(float* data);
38    static void check_max_size();
39    static void check_max_unit();
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.