Panda3D
 All Classes Functions Variables Enumerations
config_windisplay.cxx
1 // Filename: config_windisplay.cxx
2 // Created by: drose (20Dec02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "config_windisplay.h"
16 #include "winGraphicsPipe.h"
17 #include "winGraphicsWindow.h"
18 #include "dconfig.h"
19 
20 Configure(config_windisplay);
21 NotifyCategoryDef(windisplay, "display");
22 
23 ConfigureFn(config_windisplay) {
24  init_libwindisplay();
25 }
26 
27 ConfigVariableBool responsive_minimized_fullscreen_window
28 ("responsive-minimized-fullscreen-window",false);
29 
30 ConfigVariableBool hold_keys_across_windows
31 ("hold-keys-across-windows", false,
32  PRC_DESC("Set this true to remember the current state of the keyboard while "
33  "the window focus is lost, or false to pretend the user is not "
34  "holding down any keys while the window focus is lost. In either "
35  "case it should accurately restore the correct keyboard state when "
36  "the window focus is regained."));
37 
38 ConfigVariableBool do_vidmemsize_check
39 ("do-vidmemsize-check", true,
40  PRC_DESC("if true, use ddraw's GetAvailVidMem to fail if driver says "
41  "it has too little video mem"));
42 
43 ConfigVariableBool auto_cpu_data
44 ("auto-cpu-data", false,
45  PRC_DESC("Set this true to automatically get the CPU data at start; false to "
46  "require an explicit call to pipe->lookup_cpu_data(). Setting this "
47  "true may slow down startup time by 1-2 seconds."));
48 
49 ConfigVariableBool ime_aware
50 ("ime-aware", false,
51  PRC_DESC("Set this true to show ime texts on the chat panel and hide the "
52  "IME default windows. This is a mechanism to work around DX8/9 "
53  "interface."));
54 
55 ConfigVariableBool ime_hide
56 ("ime-hide", false,
57  PRC_DESC("Set this true to hide ime windows."));
58 
59 ConfigVariableBool request_dxdisplay_information
60 ("request-dxdisplay-information", false,
61  PRC_DESC("Setting this to true enables lumberingly slow and evil code at "
62  "start-up that creates a Direct3D window and subsequently fills up "
63  "up the video memory with dummy textures in order to find out how "
64  "much video memory there actually is. Leave this disabled unless "
65  "you have a specific need for this information and don't mind "
66  "having a slow start-up."));
67 
68 ConfigVariableBool dpi_aware
69 ("dpi-aware", true,
70  PRC_DESC("The default behavior is for Panda3D to disable DPI-virtualization "
71  "that is introduced in Windows 8.1. Set this to false if you are "
72  "experiencing problems with this setting."));
73 
74 ConfigVariableBool dpi_window_resize
75 ("dpi-window-resize", false,
76  PRC_DESC("Set this to true to let Panda3D resize the window according to the "
77  "DPI settings whenever the window is dragged to a monitor with "
78  "different DPI, or when the DPI setting is changed in the control "
79  "panel. Only available in Windows 8.1 and later, and requires "
80  "dpi-aware to be set as well."));
81 
82 ConfigVariableBool swapbuffer_framelock
83 ("swapbuffer-framelock", false,
84  PRC_DESC("Set this true to enable HW swapbuffer frame-lock on 3dlabs cards"));
85 
86 ////////////////////////////////////////////////////////////////////
87 // Function: init_libwindisplay
88 // Description: Initializes the library. This must be called at
89 // least once before any of the functions or classes in
90 // this library can be used. Normally it will be
91 // called by the static initializers and need not be
92 // called explicitly, but special cases exist.
93 ////////////////////////////////////////////////////////////////////
94 void
95 init_libwindisplay() {
96  static bool initialized = false;
97  if (initialized) {
98  return;
99  }
100  initialized = true;
101 
102  WinGraphicsPipe::init_type();
103  WinGraphicsWindow::init_type();
104 }
This is a convenience class to specialize ConfigVariable as a boolean type.