GraphicsPipe
from panda3d.core import GraphicsPipe
- class GraphicsPipe
Bases:
TypedReferenceCount
An object to create GraphicsOutputs that share a particular 3-D API. Normally, there will only be one GraphicsPipe in an application, although it is possible to have multiple of these at once if there are multiple different API’s available in the same machine.
Often, the GraphicsPipe corresponds to a physical output device, hence the term “pipe”, but this is not necessarily the case.
The GraphicsPipe is used by the GraphicsEngine object to create and destroy windows; it keeps ownership of the windows it creates.
M. Asad added new/interim functionality where GraphicsPipe now contains a device interface to directx/opengl which will be used to handle multiple windows from same device.
Inheritance diagram
- BFCanBindColor = 64
- BFCanBindEvery = 128
- BFCanBindLayered = 16384
- BFFbPropsOptional = 2048
- BFRefuseParasite = 1
- BFRefuseWindow = 4
- BFRequireCallbackWindow = 16
- BFRequireParasite = 2
- BFRequireWindow = 8
- BFResizeable = 256
- BFRttCumulative = 1024
- BFSizePower2 = 8192
- BFSizeSquare = 4096
- BFSizeTrackHost = 512
- BF_can_bind_color = 64
- BF_can_bind_every = 128
- BF_can_bind_layered = 16384
- BF_fb_props_optional = 2048
- BF_refuse_parasite = 1
- BF_refuse_window = 4
- BF_require_callback_window = 16
- BF_require_parasite = 2
- BF_require_window = 8
- BF_resizeable = 256
- BF_rtt_cumulative = 1024
- BF_size_power_2 = 8192
- BF_size_square = 4096
- BF_size_track_host = 512
- OTBuffer = 4
- OTFullscreenWindow = 2
- OTTextureBuffer = 8
- OTWindow = 1
- OT_buffer = 4
- OT_fullscreen_window = 2
- OT_texture_buffer = 8
- OT_window = 1
- __init__(*args, **kwargs)
- display_height
- display_information
- display_width
- display_zoom
- getClassType()
C++ Interface: get_class_type()
- getDisplayHeight()
C++ Interface: get_display_height(GraphicsPipe self)
- /**
Returns the height of the entire display, if it is known. This may return
See the caveats for get_display_width().
*/
- getDisplayInformation()
C++ Interface: get_display_information(const GraphicsPipe self)
- /**
Gets the pipe’s DisplayInformation.
*/
- getDisplayWidth()
C++ Interface: get_display_width(GraphicsPipe self)
- /**
Returns the width of the entire display, if it is known. This may return
This is not a guarantee that windows (particularly fullscreen windows)
may not be created larger than this width, but it is intended to provide a
hint to the application.
*/
- getDisplayZoom()
C++ Interface: get_display_zoom(GraphicsPipe self)
- /**
Returns the display zoom factor configured in the operating system. If the
operating system automatically scales windows to match the DPI (such as when
dpi-aware is set to false), this will be 1.0. Otherwise, this will be set to
a value approximating the density of the monitor divided by the standard
density of the operating system (usually 96), yielding a value like 1.5 or
2.0.
@since 1.10.8
*/
- getInterfaceName()
C++ Interface: get_interface_name(GraphicsPipe self)
- getSupportedTypes()
C++ Interface: get_supported_types(GraphicsPipe self)
- /**
Returns the mask of bits that represents the kinds of GraphicsOutput
objects this pipe might be able to successfully create. The return value
is the union of bits in GraphicsPipe::OutputTypes that represents the set
of GraphicsOutput types.
A 1 bit in a particular position is not a guarantee of success, but a 0 bit
is a guarantee of failure.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_display_height()
C++ Interface: get_display_height(GraphicsPipe self)
- /**
Returns the height of the entire display, if it is known. This may return
See the caveats for get_display_width().
*/
- get_display_information()
C++ Interface: get_display_information(const GraphicsPipe self)
- /**
Gets the pipe’s DisplayInformation.
*/
- get_display_width()
C++ Interface: get_display_width(GraphicsPipe self)
- /**
Returns the width of the entire display, if it is known. This may return
This is not a guarantee that windows (particularly fullscreen windows)
may not be created larger than this width, but it is intended to provide a
hint to the application.
*/
- get_display_zoom()
C++ Interface: get_display_zoom(GraphicsPipe self)
- /**
Returns the display zoom factor configured in the operating system. If the
operating system automatically scales windows to match the DPI (such as when
dpi-aware is set to false), this will be 1.0. Otherwise, this will be set to
a value approximating the density of the monitor divided by the standard
density of the operating system (usually 96), yielding a value like 1.5 or
2.0.
@since 1.10.8
*/
- get_interface_name()
C++ Interface: get_interface_name(GraphicsPipe self)
- get_supported_types()
C++ Interface: get_supported_types(GraphicsPipe self)
- /**
Returns the mask of bits that represents the kinds of GraphicsOutput
objects this pipe might be able to successfully create. The return value
is the union of bits in GraphicsPipe::OutputTypes that represents the set
of GraphicsOutput types.
A 1 bit in a particular position is not a guarantee of success, but a 0 bit
is a guarantee of failure.
*/
- interface_name
- isValid()
C++ Interface: is_valid(GraphicsPipe self)
- /**
Returns false if this pipe is known to be invalid, meaning that an attempt
to create a GraphicsWindow with the pipe will certainly fail. Returns true
if the pipe is probably valid (is this case, an attempt to create a
GraphicsWindow should succeed, but might still fail).
Use the GraphicsEngine class to create a GraphicsWindow on a particular
pipe.
*/
- is_valid()
C++ Interface: is_valid(GraphicsPipe self)
- /**
Returns false if this pipe is known to be invalid, meaning that an attempt
to create a GraphicsWindow with the pipe will certainly fail. Returns true
if the pipe is probably valid (is this case, an attempt to create a
GraphicsWindow should succeed, but might still fail).
Use the GraphicsEngine class to create a GraphicsWindow on a particular
pipe.
*/
- lookupCpuData()
C++ Interface: lookup_cpu_data(const GraphicsPipe self)
- /**
Looks up the detailed CPU information and stores it in
_display_information, if supported by the OS. This may take a second or
two.
*/
- lookup_cpu_data()
C++ Interface: lookup_cpu_data(const GraphicsPipe self)
- /**
Looks up the detailed CPU information and stores it in
_display_information, if supported by the OS. This may take a second or
two.
*/
- supportsType()
C++ Interface: supports_type(GraphicsPipe self, int flags)
- /**
A convenience function to ask if a particular type or types of
GraphicsObjects are supported. The parameter is a union of one or more
bits defined in GrpahicsPipe::OutputTypes.
Returns true if all of the requested types are listed in the
supported_types mask, false if any one of them is not. This is not a
guarantee that the indicated output type will successfully be created when
it is attempted.
*/
- supports_type()
C++ Interface: supports_type(GraphicsPipe self, int flags)
- /**
A convenience function to ask if a particular type or types of
GraphicsObjects are supported. The parameter is a union of one or more
bits defined in GrpahicsPipe::OutputTypes.
Returns true if all of the requested types are listed in the
supported_types mask, false if any one of them is not. This is not a
guarantee that the indicated output type will successfully be created when
it is attempted.
*/