00001
00002 #ifndef _GLRESOURCE_H
00003 #define _GLRESOURCE_H
00004
00005 #include "GL/GLPlatform.h"
00006
00007
00008 namespace gk {
00009
00010
00011 class GLResource
00012 {
00013
00014 GLResource( const GLResource& );
00015
00016 GLResource& operator=( const GLResource& );
00017
00018 protected:
00019 GLuint m_name;
00020
00021 public:
00022 GLResource( )
00023 :
00024 m_name(0)
00025 {}
00026
00027 virtual ~GLResource( ) {}
00028
00029
00030 virtual int createGLResource( )
00031 {
00032 return 0;
00033 }
00034
00035
00036 virtual int releaseGLResource( )
00037 {
00038 return 0;
00039 }
00040
00041 GLuint name( ) const
00042 {
00043 return m_name;
00044 }
00045
00046 operator GLuint( ) const
00047 {
00048 return m_name;
00049 }
00050 };
00051
00052 }
00053
00054 #endif