00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __IMAGE_H__
00013 #define __IMAGE_H__
00014
00015 #include <stdlib.h>
00016 #include <GL/glut.h>
00017 #include <wx/filename.h>
00018
00019
00020 namespace VRUT
00021 {
00023 class Image
00024 {
00025 protected:
00027 wxFileName filename;
00028
00029 public:
00031 Image() {}
00033 virtual ~Image() {}
00034
00036 virtual bool IsOk() const = 0;
00038 const wxFileName * GetFilename() const
00039 {
00040 return &filename;
00041 }
00043 virtual bool Load(const wxString & fname)
00044 {
00045 if (wxFileName::FileExists(fname))
00046 {
00047 filename.Assign(fname);
00048 return true;
00049 }
00050 return false;
00051 }
00054 virtual GLuint BuildOglTexture() const = 0;
00056 virtual bool HasTransparency() const = 0;
00058 virtual int GetWidth() const = 0;
00060 virtual int GetHeight() const = 0;
00061 };
00062 };
00063
00064
00065 #endif