Panda3D
|
This maintains a list of GraphicsPipes by type that are available for creation. More...
#include "graphicsPipeSelection.h"
Public Member Functions | |
bool | add_pipe_type (TypeHandle type, PipeConstructorFunc *func) |
Adds a new kind of GraphicsPipe to the list of available pipes for creation. More... | |
int | get_num_aux_modules () const |
Returns the number of display modules that are still to be loaded. More... | |
int | get_num_pipe_types () const |
Returns the number of different types of GraphicsPipes that are available to create through this interface. More... | |
TypeHandle | get_pipe_type (int n) const |
Returns the nth type of GraphicsPipe available through this interface. More... | |
void | load_aux_modules () |
Loads all the modules named in the aux-display Configrc variable, making as many graphics pipes as possible available. More... | |
MAKE_SEQ (get_pipe_types, get_num_pipe_types, get_pipe_type) | |
void | print_pipe_types () const |
Writes a list of the currently known GraphicsPipe types to nout, for the user's information. More... | |
PT (GraphicsPipe) make_pipe(const string &type_name | |
PT (GraphicsPipe) make_pipe(TypeHandle type) | |
PT (GraphicsPipe) make_module_pipe(const string &module_name) | |
PT (GraphicsPipe) make_default_pipe() | |
typedef | PT (GraphicsPipe) PipeConstructorFunc() |
Static Public Member Functions | |
static GraphicsPipeSelection * | get_global_ptr () |
Returns a pointer to the one global GraphicsPipeSelection object. More... | |
Public Attributes | |
const string & | module_name = string()) |
This maintains a list of GraphicsPipes by type that are available for creation.
Normally there is one default interactive GraphicsPipe, and possibly other types available as well.
Definition at line 36 of file graphicsPipeSelection.h.
bool GraphicsPipeSelection::add_pipe_type | ( | TypeHandle | type, |
PipeConstructorFunc * | func | ||
) |
Adds a new kind of GraphicsPipe to the list of available pipes for creation.
Normally, this is called at static init type by the various shared libraries as they are linked in. Returns true on success, false on failure.
Definition at line 357 of file graphicsPipeSelection.cxx.
References TypeRegistry::find_type_by_id(), Filename::get_basename(), TypeHandle::is_derived_from(), TypeHandle::none(), TypeRegistry::ptr(), and Filename::to_os_specific().
Referenced by load_aux_modules().
|
inlinestatic |
Returns a pointer to the one global GraphicsPipeSelection object.
Definition at line 35 of file graphicsPipeSelection.I.
Referenced by get_num_aux_modules(), PandaFramework::main_loop(), and PandaFramework::open_window().
|
inline |
Returns the number of display modules that are still to be loaded.
If this is nonzero, then calling load_aux_modules() will likely increase the number of GraphicsPipes available.
Definition at line 24 of file graphicsPipeSelection.I.
References get_global_ptr().
int GraphicsPipeSelection::get_num_pipe_types | ( | ) | const |
Returns the number of different types of GraphicsPipes that are available to create through this interface.
Definition at line 94 of file graphicsPipeSelection.cxx.
References get_pipe_type().
Referenced by PandaFramework::open_window().
TypeHandle GraphicsPipeSelection::get_pipe_type | ( | int | n | ) | const |
Returns the nth type of GraphicsPipe available through this interface.
Definition at line 112 of file graphicsPipeSelection.cxx.
References print_pipe_types().
Referenced by get_num_pipe_types(), and PandaFramework::open_window().
void GraphicsPipeSelection::load_aux_modules | ( | ) |
Loads all the modules named in the aux-display Configrc variable, making as many graphics pipes as possible available.
Definition at line 337 of file graphicsPipeSelection.cxx.
References add_pipe_type().
Referenced by PandaFramework::open_window(), and print_pipe_types().
void GraphicsPipeSelection::print_pipe_types | ( | ) | const |
Writes a list of the currently known GraphicsPipe types to nout, for the user's information.
Definition at line 132 of file graphicsPipeSelection.cxx.
References TypeRegistry::find_type(), load_aux_modules(), TypeHandle::none(), and TypeRegistry::ptr().
Referenced by get_pipe_type(), and PandaFramework::main_loop().