Panda3D
Public Types | Public Member Functions | Static Public Member Functions

GraphicsPipe Class Reference

An object to create GraphicsOutputs that share a particular 3-D API. More...

Inheritance diagram for GraphicsPipe:
TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Types

enum  BufferCreationFlags {
  BFRefuseParasite = 1, BFRequireParasite = 2, BFRefuseWindow = 4, BFRequireWindow = 8,
  BFCanBindColor = 64, BFCanBindEvery = 128, BFResizeable = 256, BFSizeTrackHost = 512,
  BFRttCumulative = 1024, BFFbPropsOptional = 2048, BFSizeSquare = 4096, BFSizePower2 = 8192
}
enum  OutputTypes { OTWindow = 1, OTFullscreenWindow = 2, OTBuffer = 4, OTTextureBuffer = 8 }

Public Member Functions

int getDisplayHeight ()
 Returns the height of the entire display, if it is known.
DisplayInformation getDisplayInformation ()
 Gets the pipe's DisplayInformation.
int getDisplayWidth ()
 Returns the width of the entire display, if it is known.
string getInterfaceName ()
int getRefCount ()
 Returns the current reference count.
int getSupportedTypes ()
 Returns the mask of bits that represents the kinds of GraphicsOutput objects this pipe might be able to successfully create.
TypeHandle getType ()
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly.
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type.
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.
 lookupCpuData ()
 Looks up the detailed CPU information and stores it in _display_information, if supported by the OS.
 ref ()
 Explicitly increments the reference count.
bool supportsType (int flags)
 A convenience function to ask if a particular type or types of GraphicsObjects are supported.
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
bool unref ()
 Explicitly decrements the reference count.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
BFRefuseParasite 
BFRequireParasite 
BFRefuseWindow 
BFRequireWindow 
BFCanBindColor 
BFCanBindEvery 
BFResizeable 
BFSizeTrackHost 
BFRttCumulative 
BFFbPropsOptional 
BFSizeSquare 
BFSizePower2 
Enumerator:
OTWindow 
OTFullscreenWindow 
OTBuffer 
OTTextureBuffer 

Member Function Documentation

static TypeHandle getClassType ( ) [static]

Reimplemented from TypedReferenceCount.

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.

string getInterfaceName ( )
int getRefCount ( ) [inherited]

Returns the current reference count.

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.

TypeHandle getType ( ) [inherited]

Reimplemented in AnimChannelBase.

int getTypeIndex ( ) [inherited]

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().

bool isExactType ( TypeHandle  handle) [inherited]

Returns true if the current object is the indicated type exactly.

bool isOfType ( TypeHandle  handle) [inherited]

Returns true if the current object is or derives from the indicated type.

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.

ref ( ) [inherited]

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.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

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.

bool testRefCountIntegrity ( ) [inherited]

Does some easy checks to make sure that the reference count isn't completely bogus.

Returns true if ok, false otherwise.

Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.

bool testRefCountNonzero ( ) [inherited]

Does some easy checks to make sure that the reference count isn't zero, or completely bogus.

Returns true if ok, false otherwise.

bool unref ( ) [inherited]

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().

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.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is true if the new reference count is nonzero, false if it is zero.

Reimplemented in GeomVertexArrayFormat, and GeomVertexFormat.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties