Panda3D
 All Classes Functions Variables Enumerations
config_windisplay.cxx
00001 // Filename: config_windisplay.cxx
00002 // Created by:  drose (20Dec02)
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 #include "config_windisplay.h"
00016 #include "winGraphicsPipe.h"
00017 #include "winGraphicsWindow.h"
00018 #include "dconfig.h"
00019 
00020 Configure(config_windisplay);
00021 NotifyCategoryDef(windisplay, "display");
00022 
00023 ConfigureFn(config_windisplay) {
00024   init_libwindisplay();
00025 }
00026 
00027 ConfigVariableBool responsive_minimized_fullscreen_window
00028 ("responsive-minimized-fullscreen-window",false);
00029 
00030 ConfigVariableBool hold_keys_across_windows
00031 ("hold-keys-across-windows", false,
00032  PRC_DESC("Set this true to remember the current state of the keyboard while "
00033           "the window focus is lost, or false to pretend the user is not "
00034           "holding down any keys while the window focus is lost.  In either "
00035           "case it should accurately restore the correct keyboard state when "
00036           "the window focus is regained."));
00037 
00038 ConfigVariableBool do_vidmemsize_check
00039 ("do-vidmemsize-check", true,
00040  PRC_DESC("if true, use ddraw's GetAvailVidMem to fail if driver says "
00041           "it has too little video mem"));
00042 
00043 ConfigVariableBool auto_cpu_data
00044 ("auto-cpu-data", false,
00045  PRC_DESC("Set this true to automatically get the CPU data at start; false to "
00046           "require an explicit call to pipe->lookup_cpu_data().  Setting this "
00047           "true may slow down startup time by 1-2 seconds."));
00048 
00049 ConfigVariableBool ime_aware
00050 ("ime-aware", false,
00051  PRC_DESC("Set this true to show ime texts on the chat panel and hide the "
00052           "IME default windows. This is a mechanism to work around DX8/9 "
00053           "interface."));
00054 
00055 ConfigVariableBool ime_hide
00056 ("ime-hide", false,
00057  PRC_DESC("Set this true to hide ime windows."));
00058 
00059 ConfigVariableBool request_dxdisplay_information
00060 ("request-dxdisplay-information", true,
00061  PRC_DESC("Setting this to false skips some display information discovery "
00062           "routines that can speed up initialization when DX support is "
00063           "present."));
00064 
00065 ConfigVariableBool swapbuffer_framelock
00066 ("swapbuffer-framelock", false,
00067  PRC_DESC("Set this true to enable HW swapbuffer frame-lock on 3dlabs cards"));
00068 
00069 ////////////////////////////////////////////////////////////////////
00070 //     Function: init_libwindisplay
00071 //  Description: Initializes the library.  This must be called at
00072 //               least once before any of the functions or classes in
00073 //               this library can be used.  Normally it will be
00074 //               called by the static initializers and need not be
00075 //               called explicitly, but special cases exist.
00076 ////////////////////////////////////////////////////////////////////
00077 void
00078 init_libwindisplay() {
00079   static bool initialized = false;
00080   if (initialized) {
00081     return;
00082   }
00083   initialized = true;
00084 
00085   WinGraphicsPipe::init_type();
00086   WinGraphicsWindow::init_type();
00087 }
 All Classes Functions Variables Enumerations