Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/wgldisplay/config_wgldisplay.cxx

Go to the documentation of this file.
00001 // Filename: config_wgldisplay.cxx
00002 // Created by:  drose (20Dec02)
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_wgldisplay.h"
00020 #include "wglGraphicsPipe.h"
00021 #include "wglGraphicsStateGuardian.h"
00022 #include "wglGraphicsWindow.h"
00023 #include "graphicsPipeSelection.h"
00024 #include "dconfig.h"
00025 
00026 Configure(config_wgldisplay);
00027 NotifyCategoryDef(wgldisplay, "windisplay");
00028 
00029 ConfigureFn(config_wgldisplay) {
00030   init_libwgldisplay();
00031 }
00032 
00033 ////////////////////////////////////////////////////////////////////
00034 //     Function: init_libwgldisplay
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_libwgldisplay() {
00043   static bool initialized = false;
00044   if (initialized) {
00045     return;
00046   }
00047   initialized = true;
00048 
00049   wglGraphicsPipe::init_type();
00050   wglGraphicsStateGuardian::init_type();
00051   wglGraphicsWindow::init_type();
00052 
00053   GraphicsPipeSelection *selection = GraphicsPipeSelection::get_global_ptr();
00054   selection->add_pipe_type(wglGraphicsPipe::get_class_type(),
00055                            wglGraphicsPipe::pipe_constructor);
00056 }
00057 
00058 int gl_force_pixfmt = config_wgldisplay.GetInt("gl-force-pixfmt", 0);
00059 
00060 // Set this true to force all GL windows to fail to open correctly.
00061 bool gl_force_invalid = config_wgldisplay.GetBool("gl-force-invalid", false);
00062 
00063 // This is true to insist that low-memory cards open only 640x480
00064 // fullscreen windows, no matter what resolution of window was
00065 // requested.  It only affects fullscreen windows.
00066 bool gl_do_vidmemsize_check = config_wgldisplay.GetBool("gl-do-vidmemsize-check", true);
00067 

Generated on Fri May 2 00:44:42 2003 for Panda by doxygen1.3