00001 // Filename: config_glxdisplay.cxx 00002 // Created by: cary (07Oct99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "config_glxdisplay.h" 00020 #include "glxGraphicsPipe.h" 00021 #include "glxGraphicsWindow.h" 00022 #include "glxGraphicsStateGuardian.h" 00023 #include "graphicsPipeSelection.h" 00024 #include "dconfig.h" 00025 00026 Configure(config_glxdisplay); 00027 NotifyCategoryDef(glxdisplay, "display"); 00028 00029 ConfigureFn(config_glxdisplay) { 00030 init_libglxdisplay(); 00031 } 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Function: init_libglxdisplay 00035 // Description: Initializes the library. This must be called at 00036 // least once before any of the functions or classes in 00037 // this library can be used. Normally it will be 00038 // called by the static initializers and need not be 00039 // called explicitly, but special cases exist. 00040 //////////////////////////////////////////////////////////////////// 00041 void 00042 init_libglxdisplay() { 00043 static bool initialized = false; 00044 if (initialized) { 00045 return; 00046 } 00047 initialized = true; 00048 00049 glxGraphicsPipe::init_type(); 00050 glxGraphicsWindow::init_type(); 00051 glxGraphicsStateGuardian::init_type(); 00052 00053 GraphicsPipeSelection *selection = GraphicsPipeSelection::get_global_ptr(); 00054 selection->add_pipe_type(glxGraphicsPipe::get_class_type(), 00055 glxGraphicsPipe::pipe_constructor); 00056 } 00057 00058 const string display_cfg = config_glxdisplay.GetString("display", "");