Panda3D
|
00001 // Filename: tinyXGraphicsPipe.h 00002 // Created by: drose (03May08) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef TINYXGRAPHICSPIPE_H 00016 #define TINYXGRAPHICSPIPE_H 00017 00018 #include "pandabase.h" 00019 00020 #ifdef HAVE_X11 00021 00022 #include "x11GraphicsWindow.h" 00023 #include "x11GraphicsPipe.h" 00024 #include "tinyGraphicsStateGuardian.h" 00025 #include "lightMutex.h" 00026 #include "lightReMutex.h" 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : TinyXGraphicsPipe 00030 // Description : This graphics pipe represents the interface for 00031 // creating TinyPanda graphics windows on an X11-based 00032 // (e.g. Unix) client. 00033 //////////////////////////////////////////////////////////////////// 00034 class EXPCL_TINYDISPLAY TinyXGraphicsPipe : public x11GraphicsPipe { 00035 public: 00036 TinyXGraphicsPipe(const string &display = string()); 00037 virtual ~TinyXGraphicsPipe(); 00038 00039 virtual string get_interface_name() const; 00040 static PT(GraphicsPipe) pipe_constructor(); 00041 00042 protected: 00043 virtual PT(GraphicsOutput) make_output(const string &name, 00044 const FrameBufferProperties &fb_prop, 00045 const WindowProperties &win_prop, 00046 int flags, 00047 GraphicsEngine *engine, 00048 GraphicsStateGuardian *gsg, 00049 GraphicsOutput *host, 00050 int retry, 00051 bool &precertify); 00052 00053 public: 00054 static TypeHandle get_class_type() { 00055 return _type_handle; 00056 } 00057 static void init_type() { 00058 x11GraphicsPipe::init_type(); 00059 register_type(_type_handle, "TinyXGraphicsPipe", 00060 x11GraphicsPipe::get_class_type()); 00061 } 00062 virtual TypeHandle get_type() const { 00063 return get_class_type(); 00064 } 00065 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00066 00067 private: 00068 static TypeHandle _type_handle; 00069 }; 00070 00071 #include "tinyXGraphicsPipe.I" 00072 00073 #endif // HAVE_X11 00074 00075 #endif