Panda3D
|
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. More...
Public Types | |
enum | BufferCreationFlags { BF_refuse_parasite = 1, BF_require_parasite = 2, BF_refuse_window = 4, BF_require_window = 8, BF_require_callback_window = 16, BF_can_bind_color = 64, BF_can_bind_every = 128, BF_resizeable = 256, BF_size_track_host = 512, BF_rtt_cumulative = 1024, BF_fb_props_optional = 2048, BF_size_square = 4096, BF_size_power_2 = 8192, BF_can_bind_layered = 16384 } |
enum | OutputTypes { OT_window = 1, OT_fullscreen_window = 2, OT_buffer = 4, OT_texture_buffer = 8 } |
Public Member Functions | |
int | getDisplayHeight () |
Returns the height of the entire display, if it is known. This may return 0. See the caveats for get_display_width(). More... | |
DisplayInformation | getDisplayInformation () |
Gets the pipe's DisplayInformation. More... | |
int | getDisplayWidth () |
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. More... | |
str | getInterfaceName () |
int | getSupportedTypes () |
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. More... | |
bool | isValid () |
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). More... | |
lookupCpuData () | |
Looks up the detailed CPU information and stores it in _display_information, if supported by the OS. This may take a second or two. More... | |
bool | supportsType (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. More... | |
![]() | |
TypeHandle | getType () |
Derived classes should override this function to return get_class_type(). More... | |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). More... | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. More... | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. More... | |
![]() | |
int | getRefCount () |
Returns the current reference count. More... | |
ref () | |
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. More... | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More... | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More... | |
bool | unref () |
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete(). More... | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
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.
enum BufferCreationFlags |
Enumerator | |
---|---|
BF_refuse_parasite | Flags that control what type of output is returned. |
BF_require_parasite | |
BF_refuse_window | |
BF_require_window | |
BF_require_callback_window | |
BF_can_bind_color | Need capability: bind the color bitplane to a tex. |
BF_can_bind_every | Need capability: bind all bitplanes to a tex. |
BF_resizeable | Buffer should allow set_size. |
BF_size_track_host | Buffer should track the host size. |
BF_rtt_cumulative | Buffer supports cumulative render-to-texture. |
BF_fb_props_optional | FrameBufferProperties can be ignored. |
BF_size_square | x_size must equal y_size (e.g. for cube maps) |
BF_size_power_2 | x_size and y_size must each be a power of two |
BF_can_bind_layered | Need capability: support RTM_bind_layered. |
enum OutputTypes |
|
static |
int getDisplayHeight | ( | ) |
Returns the height of the entire display, if it is known. This may return 0. See the caveats for get_display_width().
DisplayInformation getDisplayInformation | ( | ) |
Gets the pipe's DisplayInformation.
int getDisplayWidth | ( | ) |
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.
str getInterfaceName | ( | ) |
int getSupportedTypes | ( | ) |
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.
bool isValid | ( | ) |
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 | ( | ) |
Looks up the detailed CPU information and stores it in _display_information, if supported by the OS. This may take a second or two.
bool supportsType | ( | 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.