Panda3D
|
00001 // Filename: tinySDLGraphicsPipe.h 00002 // Created by: drose (24Apr08) 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 TINYSDLGRAPHICSPIPE_H 00016 #define TINYSDLGRAPHICSPIPE_H 00017 00018 #include "pandabase.h" 00019 00020 #ifdef HAVE_SDL 00021 00022 #include "graphicsWindow.h" 00023 #include "graphicsPipe.h" 00024 00025 class FrameBufferProperties; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : TinySDLGraphicsPipe 00029 // Description : This graphics pipe manages SDL windows for rendering 00030 // TinyPanda software buffers. 00031 //////////////////////////////////////////////////////////////////// 00032 class EXPCL_TINYDISPLAY TinySDLGraphicsPipe : public GraphicsPipe { 00033 public: 00034 TinySDLGraphicsPipe(); 00035 virtual ~TinySDLGraphicsPipe(); 00036 00037 virtual string get_interface_name() const; 00038 static PT(GraphicsPipe) pipe_constructor(); 00039 00040 protected: 00041 virtual PT(GraphicsOutput) make_output(const string &name, 00042 const FrameBufferProperties &fb_prop, 00043 const WindowProperties &win_prop, 00044 int flags, 00045 GraphicsEngine *engine, 00046 GraphicsStateGuardian *gsg, 00047 GraphicsOutput *host, 00048 int retry, 00049 bool &precertify); 00050 00051 public: 00052 static TypeHandle get_class_type() { 00053 return _type_handle; 00054 } 00055 static void init_type() { 00056 GraphicsPipe::init_type(); 00057 register_type(_type_handle, "TinySDLGraphicsPipe", 00058 GraphicsPipe::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 #include "tinySDLGraphicsPipe.I" 00070 00071 #endif // HAVE_SDL 00072 00073 #endif