panda3d.core.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

Inheritance diagram of GraphicsPipe

enum BufferCreationFlags
enumerator BF_refuse_parasite = 1

Flags that control what type of output is returned.

enumerator BF_require_parasite = 2
enumerator BF_refuse_window = 4
enumerator BF_require_window = 8
enumerator BF_require_callback_window = 16
enumerator BF_can_bind_color = 64

Need capability: bind the color bitplane to a tex.

enumerator BF_can_bind_every = 128

Need capability: bind all bitplanes to a tex.

enumerator BF_resizeable = 256

Buffer should allow set_size.

enumerator BF_size_track_host = 512

Buffer should track the host size.

enumerator BF_rtt_cumulative = 1024

Buffer supports cumulative render-to-texture.

enumerator BF_fb_props_optional = 2048

FrameBufferProperties can be ignored.

enumerator BF_size_square = 4096

x_size must equal y_size (e.g. for cube maps)

enumerator BF_size_power_2 = 8192

x_size and y_size must each be a power of two

enumerator BF_can_bind_layered = 16384

Need capability: support RTM_bind_layered.

enum OutputTypes
enumerator OT_window = 1
enumerator OT_fullscreen_window = 2
enumerator OT_buffer = 4
enumerator OT_texture_buffer = 8
property display_height

Returns the height of the entire display, if it is known. This may return 0. See the caveats for getDisplayWidth().

Return type

int

property display_information

Gets the pipe’s DisplayInformation.

Return type

DisplayInformation

property display_width

Returns the width of the entire display, if it is known. This may return 0. 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.

Return type

int

static getClassType() → TypeHandle
Return type

TypeHandle

getDisplayHeight() → int

Returns the height of the entire display, if it is known. This may return 0. See the caveats for getDisplayWidth().

getDisplayInformation() → DisplayInformation

Gets the pipe’s DisplayInformation.

Return type

DisplayInformation

getDisplayWidth() → int

Returns the width of the entire display, if it is known. This may return 0. 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.

getInterfaceName() → str
getSupportedTypes() → int

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 GraphicsPipeOutputTypes 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.

property interface_name
Return type

string

isValid() → bool

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() → None

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(flags: int) → bool

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.