Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

X3DImageType.h

Go to the documentation of this file.
00001 
00002 
00003 
00005 
00006 
00011 
00016 
00021 //                            X3DImageType.h                                  //
00023 
00024 #ifndef X3DIMAGETYPE_H
00025 #define X3DIMAGETYPE_H
00026 
00027 #include <GL/gl.h>
00028 
00029 namespace X3DTK {
00030 
00033 
00034 class X3DImageType
00035 {
00036 public:
00038   X3DImageType();
00040   virtual ~X3DImageType();
00041   
00043   virtual bool load(const char *fileName) = 0;  
00045   void resize(unsigned short width, unsigned short height);
00048   void resizeGL(float (& textureTransform)[16]);
00049   
00051   inline unsigned short getWidth() const {return _width;};
00053   inline unsigned short getHeight() const {return _height;};
00055   GLenum getGLType() const;
00057   inline unsigned char* getData() const {return data;};
00059   void release();
00060 
00061 protected:
00063   unsigned char *data;
00065   bool allocate(int pixelFormat, unsigned short width, unsigned short height);
00066 
00067 private:
00068   int _pixelFormat;    
00069   unsigned short _width;
00070   unsigned short _height;
00071 };
00072 
00073 }
00074 
00075 #endif

Generated on Wed Sep 10 11:25:15 2003 for X3DToolKit by doxygen1.3