Line | |
---|
1 | /*
|
---|
2 | * ----------------------------------------------------------------------
|
---|
3 | * Texture2D.h: 2d 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 |
|
---|
16 | #ifndef _TEXTURE_2D_H_
|
---|
17 | #define _TEXTURE_2D_H_
|
---|
18 |
|
---|
19 | #include <GL/glew.h>
|
---|
20 |
|
---|
21 | class Texture2D{
|
---|
22 |
|
---|
23 | public:
|
---|
24 | int width;
|
---|
25 | int height;
|
---|
26 |
|
---|
27 | GLuint type;
|
---|
28 | GLuint id;
|
---|
29 | GLuint interp_type;
|
---|
30 | int n_components;
|
---|
31 |
|
---|
32 | Texture2D();
|
---|
33 | Texture2D(int width, int height, GLuint type, GLuint interp, int n);
|
---|
34 | ~Texture2D();
|
---|
35 |
|
---|
36 | void activate();
|
---|
37 | void deactivate();
|
---|
38 | GLuint initialize(float* data);
|
---|
39 | static void check_max_size();
|
---|
40 | static void check_max_unit();
|
---|
41 | };
|
---|
42 |
|
---|
43 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.