00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TINYOSXGRAPHICSPIPE_H
00016 #define TINYOSXGRAPHICSPIPE_H
00017
00018 #include "pandabase.h"
00019
00020 #if defined(IS_OSX) && !defined(BUILD_IPHONE)
00021
00022
00023
00024
00025 #include <Carbon/Carbon.h>
00026
00027 #include "graphicsPipe.h"
00028 #include "tinyGraphicsStateGuardian.h"
00029
00030
00031
00032
00033
00034
00035 class EXPCL_TINYDISPLAY TinyOsxGraphicsPipe : public GraphicsPipe {
00036 public:
00037 TinyOsxGraphicsPipe();
00038 virtual ~TinyOsxGraphicsPipe();
00039
00040 virtual string get_interface_name() const;
00041 static PT(GraphicsPipe) pipe_constructor();
00042
00043 static CGImageRef create_cg_image(const PNMImage &pnm_image);
00044
00045 private:
00046 static void release_data(void *info, const void *data, size_t size);
00047
00048 protected:
00049 virtual PT(GraphicsOutput) make_output(const string &name,
00050 const FrameBufferProperties &fb_prop,
00051 const WindowProperties &win_prop,
00052 int flags,
00053 GraphicsEngine *engine,
00054 GraphicsStateGuardian *gsg,
00055 GraphicsOutput *host,
00056 int retry,
00057 bool &precertify);
00058
00059 public:
00060 static TypeHandle get_class_type() {
00061 return _type_handle;
00062 }
00063 static void init_type() {
00064 GraphicsPipe::init_type();
00065 register_type(_type_handle, "TinyOsxGraphicsPipe",
00066 GraphicsPipe::get_class_type());
00067 }
00068 virtual TypeHandle get_type() const {
00069 return get_class_type();
00070 }
00071 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00072
00073 private:
00074 static TypeHandle _type_handle;
00075 };
00076
00077 #include "tinyOsxGraphicsPipe.I"
00078
00079 #endif // IS_OSX
00080
00081 #endif