00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GLXGRAPHICSPIXMAP_H
00016 #define GLXGRAPHICSPIXMAP_H
00017
00018 #include "pandabase.h"
00019
00020 #include "glxGraphicsPipe.h"
00021 #include "graphicsBuffer.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class glxGraphicsPixmap : public GraphicsBuffer {
00032 public:
00033 glxGraphicsPixmap(GraphicsEngine *engine, GraphicsPipe *pipe,
00034 const string &name,
00035 const FrameBufferProperties &fb_prop,
00036 const WindowProperties &win_prop,
00037 int flags,
00038 GraphicsStateGuardian *gsg,
00039 GraphicsOutput *host);
00040 virtual ~glxGraphicsPixmap();
00041
00042 virtual bool begin_frame(FrameMode mode, Thread *current_thread);
00043 virtual void end_frame(FrameMode mode, Thread *current_thread);
00044
00045 protected:
00046 virtual void close_buffer();
00047 virtual bool open_buffer();
00048
00049 private:
00050 X11_Display *_display;
00051 X11_Window _drawable;
00052 Pixmap _x_pixmap;
00053 GLXPixmap _glx_pixmap;
00054
00055 public:
00056 static TypeHandle get_class_type() {
00057 return _type_handle;
00058 }
00059 static void init_type() {
00060 GraphicsBuffer::init_type();
00061 register_type(_type_handle, "glxGraphicsPixmap",
00062 GraphicsBuffer::get_class_type());
00063 }
00064 virtual TypeHandle get_type() const {
00065 return get_class_type();
00066 }
00067 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00068
00069 private:
00070 static TypeHandle _type_handle;
00071 };
00072
00073 #include "glxGraphicsPixmap.I"
00074
00075 #endif