Panda3D
|
00001 // Filename: osMesaGraphicsPipe.h 00002 // Created by: drose (09Feb04) 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 OSMESAGRAPHICSPIPE_H 00016 #define OSMESAGRAPHICSPIPE_H 00017 00018 #include "pandabase.h" 00019 #include "graphicsWindow.h" 00020 #include "graphicsPipe.h" 00021 #include "mesagsg.h" 00022 00023 class FrameBufferProperties; 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Class : OsMesaGraphicsPipe 00027 // Description : This graphics pipe represents the interface for 00028 // rendering with direct calls to the Mesa open-source 00029 // software-only implementation of OpenGL. 00030 // 00031 // Raw Mesa supports only offscreen buffers, but it's 00032 // possible to create and render into these offscreen 00033 // buffers without having any X server or other 00034 // operating system infrastructure in place. 00035 //////////////////////////////////////////////////////////////////// 00036 class EXPCL_PANDAMESA OsMesaGraphicsPipe : public GraphicsPipe { 00037 public: 00038 OsMesaGraphicsPipe(); 00039 virtual ~OsMesaGraphicsPipe(); 00040 00041 virtual string get_interface_name() const; 00042 static PT(GraphicsPipe) pipe_constructor(); 00043 00044 protected: 00045 virtual PT(GraphicsOutput) make_output(const string &name, 00046 const FrameBufferProperties &fb_prop, 00047 const WindowProperties &win_prop, 00048 int flags, 00049 GraphicsEngine *engine, 00050 GraphicsStateGuardian *gsg, 00051 GraphicsOutput *host, 00052 int retry, 00053 bool &precertify); 00054 00055 private: 00056 00057 public: 00058 static TypeHandle get_class_type() { 00059 return _type_handle; 00060 } 00061 static void init_type() { 00062 GraphicsPipe::init_type(); 00063 register_type(_type_handle, "OsMesaGraphicsPipe", 00064 GraphicsPipe::get_class_type()); 00065 } 00066 virtual TypeHandle get_type() const { 00067 return get_class_type(); 00068 } 00069 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00070 00071 private: 00072 static TypeHandle _type_handle; 00073 }; 00074 00075 #include "osMesaGraphicsPipe.I" 00076 00077 #endif