Go to the documentation of this file.00001 #ifndef _TEXTURE_H_
00002 #define _TEXTURE_H_
00003
00004 #include "widget.h"
00005
00006
00007
00008
00009
00010
00011
00012
00013 class _iil4mitkTexture {
00014
00015 public:
00016
00021 _iil4mitkTexture (iil4mitkWidget* parent);
00022
00030 virtual ~_iil4mitkTexture ();
00031
00036 void bind ();
00037
00041 void setSize (const unsigned int width, const unsigned int height);
00042
00046 unsigned int width () const;
00047
00051 unsigned int height () const;
00052
00056 enum {INTENSITY = 0, INTENSITY_ALPHA, COLOR, COLOR_ALPHA, RGB, RGBA};
00057
00063 void setModel (int model);
00064
00073 void setData (const unsigned char* data);
00074
00080 void setInterpolation (const bool on = true);
00081
00085 void invalidate ();
00086
00091 bool isValid ();
00092
00093 private:
00094
00098 GLuint _name;
00099
00103 unsigned int _width, _height;
00104
00108 GLenum _model;
00109
00113 const unsigned char* _data;
00114
00118 GLenum _internal;
00119
00123 bool _valid;
00124
00128 bool _interpolation;
00129
00133 float _red, _green, _blue, _alpha;
00134
00135 iil4mitkWidget* parent;
00136 };
00137
00138 #endif