00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef IPHONEGRAPHICSSTATEGUARDIAN_H
00016 #define IPHONEGRAPHICSSTATEGUARDIAN_H
00017
00018 #include "pandabase.h"
00019 #include "glesgsg.h"
00020
00021 #include "iPhoneGraphicsWindow.h"
00022
00023 class IPhoneGraphicsWindow;
00024
00025
00026
00027
00028
00029 class IPhoneGraphicsStateGuardian : public GLESGraphicsStateGuardian {
00030 public:
00031 IPhoneGraphicsStateGuardian(GraphicsEngine *engine, GraphicsPipe *pipe,
00032 IPhoneGraphicsStateGuardian *share_with);
00033 virtual ~IPhoneGraphicsStateGuardian();
00034 virtual void reset();
00035
00036 protected:
00037 virtual void *get_extension_func(const char *prefix, const char *name);
00038
00039 private:
00040 void describe_pixel_format(FrameBufferProperties &fb_props);
00041
00042
00043
00044
00045 PT(IPhoneGraphicsStateGuardian) _share_with;
00046
00047 public:
00048 GLint _shared_buffer;
00049
00050 public:
00051 static TypeHandle get_class_type() {
00052 return _type_handle;
00053 }
00054 static void init_type() {
00055 GLESGraphicsStateGuardian::init_type();
00056 register_type(_type_handle, "IPhoneGraphicsStateGuardian",
00057 GLESGraphicsStateGuardian::get_class_type());
00058 }
00059 virtual TypeHandle get_type() const {
00060 return get_class_type();
00061 }
00062 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00063
00064 private:
00065 static TypeHandle _type_handle;
00066
00067 friend class IPhoneGraphicsBuffer;
00068 };
00069
00070
00071 #endif