00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGLGRAPHICSPIXMAP_H
00016 #define EGLGRAPHICSPIXMAP_H
00017
00018 #include "pandabase.h"
00019
00020 #include "eglGraphicsPipe.h"
00021 #include "graphicsBuffer.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030 class eglGraphicsPixmap : public GraphicsBuffer {
00031 public:
00032 eglGraphicsPixmap(GraphicsEngine *engine, GraphicsPipe *pipe,
00033 const string &name,
00034 const FrameBufferProperties &fb_prop,
00035 const WindowProperties &win_prop,
00036 int flags,
00037 GraphicsStateGuardian *gsg,
00038 GraphicsOutput *host);
00039 virtual ~eglGraphicsPixmap();
00040
00041 virtual bool begin_frame(FrameMode mode, Thread *current_thread);
00042 virtual void end_frame(FrameMode mode, Thread *current_thread);
00043
00044 protected:
00045 virtual void close_buffer();
00046 virtual bool open_buffer();
00047
00048 private:
00049 X11_Display *_display;
00050 X11_Window _drawable;
00051 Pixmap _x_pixmap;
00052 EGLSurface _egl_surface;
00053 EGLDisplay _egl_display;
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, "eglGraphicsPixmap",
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 #endif