source: trunk/vizservers/nanovis/Texture2D.h @ 750

Last change on this file since 750 was 432, checked in by qiaow, 18 years ago

Added some comments

File size: 1.1 KB
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
21class Texture2D{
22       
23public:
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, float* data);
34  ~Texture2D();
35       
36  void activate();
37  void deactivate();
38  void enable();
39  void disable();
40  GLuint initialize(float* data);
41  static void check_max_size();
42  static void check_max_unit();
43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.