15 #include "config_tinydisplay.h"
16 #include "tinyXGraphicsPipe.h"
17 #include "tinyXGraphicsWindow.h"
18 #include "tinyWinGraphicsPipe.h"
19 #include "tinyWinGraphicsWindow.h"
20 #include "tinyOsxGraphicsPipe.h"
21 #include "tinyOsxGraphicsWindow.h"
22 #include "tinySDLGraphicsPipe.h"
23 #include "tinySDLGraphicsWindow.h"
24 #include "tinyOffscreenGraphicsPipe.h"
25 #include "tinyGraphicsBuffer.h"
26 #include "tinyGraphicsStateGuardian.h"
27 #include "tinyGeomMunger.h"
28 #include "tinyTextureContext.h"
29 #include "graphicsPipeSelection.h"
31 #include "pandaSystem.h"
33 Configure(config_tinydisplay);
34 NotifyCategoryDef(tinydisplay,
"display");
36 ConfigureFn(config_tinydisplay) {
37 init_libtinydisplay();
41 (
"show-resize-box",
true,
42 PRC_DESC(
"When this variable is true, then resizable OSX Panda windows will "
43 "be rendered with a resize control in the lower-right corner. "
44 "This is specially handled by Panda, since otherwise the 3-d "
45 "window would completely hide any resize control drawn by the "
46 "OS. Set this variable false to allow this control to be hidden."));
49 (
"osx-disable-event-loop",
false,
50 PRC_DESC(
"Set this true to disable the window event loop for the Panda "
51 "windows. This makes sense only in a publish environment where "
52 "the window event loop is already handled by another part of the "
56 (
"osx-mouse-wheel-scale", 1,
57 PRC_DESC(
"Specify the number of units to spin the Mac mouse wheel to "
58 "represent a single wheel_up or wheel_down message."));
61 (
"td-ignore-mipmaps",
false,
62 PRC_DESC(
"Configure this true to disable use of mipmaps on the "
63 "tinydisplay software renderer."));
66 (
"td-ignore-clamp",
false,
67 PRC_DESC(
"Configure this true to disable texture clamp mode and other "
68 "wrap modes other than repeat (all textures will repeat, which "
69 "is a little cheaper)."));
72 (
"td-perspective-textures",
true,
73 PRC_DESC(
"Configure this false to disable use of perspective-correct "
74 "textures on the tinydisplay software renderer, for a small "
75 "performance gain."));
86 init_libtinydisplay() {
87 static bool initialized =
false;
93 TinyGraphicsBuffer::init_type();
94 TinyGraphicsStateGuardian::init_type();
95 TinyGeomMunger::init_type();
96 TinyTextureContext::init_type();
104 TinyXGraphicsPipe::init_type();
105 TinyXGraphicsWindow::init_type();
106 selection->
add_pipe_type(TinyXGraphicsPipe::get_class_type(),
107 TinyXGraphicsPipe::pipe_constructor);
112 TinyWinGraphicsPipe::init_type();
113 TinyWinGraphicsWindow::init_type();
114 selection->
add_pipe_type(TinyWinGraphicsPipe::get_class_type(),
115 TinyWinGraphicsPipe::pipe_constructor);
119 #if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON) && !__LP64__
120 TinyOsxGraphicsPipe::init_type();
121 TinyOsxGraphicsWindow::init_type();
122 selection->
add_pipe_type(TinyOsxGraphicsPipe::get_class_type(),
123 TinyOsxGraphicsPipe::pipe_constructor);
128 TinySDLGraphicsPipe::init_type();
129 TinySDLGraphicsWindow::init_type();
130 selection->
add_pipe_type(TinySDLGraphicsPipe::get_class_type(),
131 TinySDLGraphicsPipe::pipe_constructor);
135 TinyOffscreenGraphicsPipe::init_type();
136 selection->
add_pipe_type(TinyOffscreenGraphicsPipe::get_class_type(),
137 TinyOffscreenGraphicsPipe::pipe_constructor);
147 get_pipe_type_p3tinydisplay() {
150 return TinyWinGraphicsPipe::get_class_type().get_index();
153 #if defined(IS_OSX) && !defined(BUILD_IPHONE) && defined(HAVE_CARBON) && !__LP64__
154 return TinyOsxGraphicsPipe::get_class_type().get_index();
158 return TinyXGraphicsPipe::get_class_type().get_index();
162 return TinySDLGraphicsPipe::get_class_type().get_index();
165 return TinyOffscreenGraphicsPipe::get_class_type().
get_index();
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
This class is used as a namespace to group several global properties of Panda.
int get_index() const
Returns the integer index associated with this TypeHandle.
This is a convenience class to specialize ConfigVariable as a boolean type.
void add_system(const string &system)
Intended for use by each subsystem to register itself at startup.
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.
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.
void set_system_tag(const string &system, const string &tag, const string &value)
Intended for use by each subsystem to register its set of capabilities at startup.