Line | |
---|
1 | /*
|
---|
2 | * ----------------------------------------------------------------------
|
---|
3 | * Texture1D.h: 1d texture class
|
---|
4 | *
|
---|
5 | * ======================================================================
|
---|
6 | * AUTHOR: Wei Qiao <qiaow@purdue.edu>
|
---|
7 | * Purdue Rendering and Perceptualization Lab (PURPL)
|
---|
8 | *
|
---|
9 | * Copyright (c) 2004-2006 Purdue Research Foundation
|
---|
10 | *
|
---|
11 | * See the file "license.terms" for information on usage and
|
---|
12 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
---|
13 | * ======================================================================
|
---|
14 | */
|
---|
15 | #ifndef _TEXTURE_1D_H_
|
---|
16 | #define _TEXTURE_1D_H_
|
---|
17 |
|
---|
18 | #include <GL/glew.h>
|
---|
19 |
|
---|
20 | class Texture1D{
|
---|
21 |
|
---|
22 | public:
|
---|
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.