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