00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PARASITEBUFFER_H
00016 #define PARASITEBUFFER_H
00017
00018 #include "pandabase.h"
00019
00020 #include "graphicsOutput.h"
00021 #include "texture.h"
00022 #include "pointerTo.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class EXPCL_PANDA_DISPLAY ParasiteBuffer : public GraphicsOutput {
00052 public:
00053 ParasiteBuffer(GraphicsOutput *host, const string &name,
00054 int x_size, int y_size, int flags);
00055
00056 PUBLISHED:
00057 virtual ~ParasiteBuffer();
00058
00059 virtual bool is_active() const;
00060 void set_size(int x, int y);
00061
00062 public:
00063 void set_size_and_recalc(int x, int y);
00064 virtual bool flip_ready() const;
00065 virtual void begin_flip();
00066 virtual void ready_flip();
00067 virtual void end_flip();
00068
00069 virtual bool begin_frame(FrameMode mode, Thread *current_thread);
00070 virtual void end_frame(FrameMode mode, Thread *current_thread);
00071 virtual GraphicsOutput *get_host();
00072
00073 private:
00074 int _creation_flags;
00075
00076 public:
00077 static TypeHandle get_class_type() {
00078 return _type_handle;
00079 }
00080 static void init_type() {
00081 GraphicsOutput::init_type();
00082 register_type(_type_handle, "ParasiteBuffer",
00083 GraphicsOutput::get_class_type());
00084 }
00085 virtual TypeHandle get_type() const {
00086 return get_class_type();
00087 }
00088 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00089
00090 private:
00091 static TypeHandle _type_handle;
00092 };
00093
00094 #include "parasiteBuffer.I"
00095
00096 #endif