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

panda/src/windisplay/config_windisplay.cxx

Go to the documentation of this file.
00001 // Filename: config_windisplay.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_windisplay.h"
00020 #include "winGraphicsPipe.h"
00021 #include "winGraphicsWindow.h"
00022 #include "dconfig.h"
00023 
00024 Configure(config_windisplay);
00025 NotifyCategoryDef(windisplay, "display");
00026 
00027 ConfigureFn(config_windisplay) {
00028   init_libwindisplay();
00029 }
00030 
00031 bool show_fps_meter = config_windisplay.GetBool("show-fps-meter", false);
00032 float fps_meter_update_interval = max(0.5,config_windisplay.GetFloat("fps-meter-update-interval", 1.7));
00033 
00034 bool responsive_minimized_fullscreen_window = config_windisplay.GetBool("responsive-minimized-fullscreen-window",false);
00035 
00036 // Set this true to not attempt to use any of the function calls that
00037 // will crab out WireGL.
00038 bool support_wiregl = config_windisplay.GetBool("support-wiregl", false);
00039 
00040 // if true, use ddraw's GetAvailVidMem to fail if driver says it has too little video mem
00041 bool do_vidmemsize_check = config_windisplay.GetBool("do-vidmemsize-check", true);
00042 
00043 // For now, set this true to use the IME correctly on Win2000, or
00044 // false on Win98.  This is temporary; once we have been able to
00045 // verify that this distinction is actually necessary, we can replace
00046 // this config variable with an actual OS detection.
00047 bool ime_composition_w = config_windisplay.GetBool("ime-composition-w", true);
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 //     Function: init_libwindisplay
00051 //  Description: Initializes the library.  This must be called at
00052 //               least once before any of the functions or classes in
00053 //               this library can be used.  Normally it will be
00054 //               called by the static initializers and need not be
00055 //               called explicitly, but special cases exist.
00056 ////////////////////////////////////////////////////////////////////
00057 void
00058 init_libwindisplay() {
00059   static bool initialized = false;
00060   if (initialized) {
00061     return;
00062   }
00063   initialized = true;
00064 
00065   WinGraphicsPipe::init_type();
00066   WinGraphicsWindow::init_type();
00067 }
00068 
00069 // cant use global var cleanly because global var static init executed
00070 // after init_libwin(), incorrectly reiniting var
00071 Filename get_icon_filename() {
00072   string iconname = config_windisplay.GetString("win32-window-icon","");
00073   return ExecutionEnvironment::expand_string(iconname);
00074 }
00075 
00076 Filename get_color_cursor_filename() {
00077   string cursorname = config_windisplay.GetString("win32-color-cursor","");
00078   return ExecutionEnvironment::expand_string(cursorname);
00079 }
00080 
00081 Filename get_mono_cursor_filename() {
00082   string cursorname = config_windisplay.GetString("win32-mono-cursor","");
00083   return ExecutionEnvironment::expand_string(cursorname);
00084 }
00085 
00086 
00087 //  Configure this true to force the rendering to sync to the video
00088 //  refresh, or false to let your frame rate go as high as it can,
00089 //  irrespective of the video refresh.  (if this capability is
00090 //  available in the ICD)
00091 bool sync_video = config_windisplay.GetBool("sync-video", true);
00092 
00093 // Set this true to enable HW swapbuffer frame-lock on 3dlabs cards
00094 bool swapbuffer_framelock = config_windisplay.GetBool("swapbuffer-framelock", false);
00095 
00096 bool force_software_renderer = config_windisplay.GetBool("force-software-renderer", false);
00097 bool allow_software_renderer = config_windisplay.GetBool("allow-software-renderer", false);

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