Panda3D
config_wgldisplay.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file config_wgldisplay.cxx
10  * @author drose
11  * @date 2002-12-20
12  */
13 
14 #include "config_wgldisplay.h"
15 #include "wglGraphicsBuffer.h"
16 #include "wglGraphicsPipe.h"
18 #include "wglGraphicsWindow.h"
19 #include "graphicsPipeSelection.h"
20 #include "dconfig.h"
21 #include "pandaSystem.h"
22 
23 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_WGLDISPLAY)
24  #error Buildsystem error: BUILDING_PANDA_WGLDISPLAY not defined
25 #endif
26 
27 Configure(config_wgldisplay);
28 NotifyCategoryDef(wgldisplay, "display");
29 
30 ConfigureFn(config_wgldisplay) {
32 }
33 
34 ConfigVariableInt gl_force_pixfmt
35 ("gl-force-pixfmt", 0);
36 
37 ConfigVariableBool gl_force_invalid
38 ("gl-force-invalid", false,
39  PRC_DESC("Set this true to force all GL windows to fail to open "
40  "correctly (for debugging)."));
41 
42 ConfigVariableBool gl_do_vidmemsize_check
43 ("gl-do-vidmemsize-check", true,
44  PRC_DESC("This is true to insist that low-memory cards open only 640x480 "
45  "fullscreen windows, no matter what resolution of window was "
46  "requested. It only affects fullscreen windows."));
47 
48 /**
49  * Initializes the library. This must be called at least once before any of
50  * the functions or classes in this library can be used. Normally it will be
51  * called by the static initializers and need not be called explicitly, but
52  * special cases exist.
53  */
54 void
56  static bool initialized = false;
57  if (initialized) {
58  return;
59  }
60  initialized = true;
61 
62  wglGraphicsBuffer::init_type();
63  wglGraphicsPipe::init_type();
64  wglGraphicsStateGuardian::init_type();
65  wglGraphicsWindow::init_type();
66 
68  selection->add_pipe_type(wglGraphicsPipe::get_class_type(),
69  wglGraphicsPipe::pipe_constructor);
70 
72  ps->set_system_tag("OpenGL", "window_system", "WGL");
73 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is used as a namespace to group several global properties of Panda.
Definition: pandaSystem.h:26
This is a convenience class to specialize ConfigVariable as a boolean type.
void init_libwgldisplay()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This maintains a list of GraphicsPipes by type that are available for creation.
static GraphicsPipeSelection * get_global_ptr()
Returns a pointer to the one global GraphicsPipeSelection object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_system_tag(const std::string &system, const std::string &tag, const std::string &value)
Intended for use by each subsystem to register its set of capabilities at startup.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool add_pipe_type(TypeHandle type, PipeConstructorFunc *func)
Adds a new kind of GraphicsPipe to the list of available pipes for creation.
This is a convenience class to specialize ConfigVariable as an integer type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.