An object to create GraphicsOutputs that share a particular 3-D API. More...
#include "graphicsPipe.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
GraphicsDevice * | get_device () const |
Returns a pointer to device object. More... | |
int | get_display_height () const |
DisplayInformation * | get_display_information () |
int | get_display_width () const |
virtual std::string | get_interface_name () const =0 |
virtual PreferredWindowThread | get_preferred_window_thread () const |
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be performed: typically either the app thread (e.g. More... | |
int | get_supported_types () const |
Returns the mask of bits that represents the kinds of GraphicsOutput objects this pipe might be able to successfully create. More... | |
virtual TypeHandle | get_type () const |
bool | is_valid () const |
Returns false if this pipe is known to be invalid, meaning that an attempt to create a GraphicsWindow with the pipe will certainly fail. More... | |
virtual void | lookup_cpu_data () |
Looks up the detailed CPU information and stores it in _display_information, if supported by the OS. More... | |
virtual | PT (GraphicsDevice) make_device(void *scrn |
virtual | PT (GraphicsStateGuardian) make_callback_gsg(GraphicsEngine *engine) |
bool | supports_type (int flags) const |
A convenience function to ask if a particular type or types of GraphicsObjects are supported. More... | |
Public Member Functions inherited from TypedReferenceCount | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
Public Member Functions inherited from TypedObject | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
TypedObject & | operator= (const TypedObject ©)=default |
Public Member Functions inherited from ReferenceCount | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Static Public Member Functions inherited from TypedReferenceCount | |
static TypeHandle | get_class_type () |
static void | init_type () |
Static Public Member Functions inherited from TypedObject | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. More... | |
Static Public Member Functions inherited from ReferenceCount | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
get_display_height | |
Returns the height of the entire display, if it is known. More... | |
get_display_information | |
Gets the pipe's DisplayInformation. More... | |
get_display_width | |
Returns the width of the entire display, if it is known. More... | |
get_interface_name | |
Public Attributes inherited from TypedObject | |
get_type | |
Public Attributes inherited from ReferenceCount | |
get_ref_count | |
Returns the current reference count. More... | |
Friends | |
class | GraphicsEngine |
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.
Definition at line 52 of file graphicsPipe.h.
|
inline |
Returns a pointer to device object.
Definition at line 81 of file graphicsPipe.I.
|
virtual |
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be performed: typically either the app thread (e.g.
X) or the draw thread (Windows).
Reimplemented in x11GraphicsPipe, AndroidGraphicsPipe, CocoaGraphicsPipe, IPhoneGraphicsPipe, and osxGraphicsPipe.
Definition at line 219 of file graphicsPipe.cxx.
|
inline |
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.
Definition at line 38 of file graphicsPipe.I.
|
inline |
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.
Definition at line 24 of file graphicsPipe.I.
|
virtual |
Looks up the detailed CPU information and stores it in _display_information, if supported by the OS.
This may take a second or two.
Reimplemented in WinGraphicsPipe.
Definition at line 291 of file graphicsPipe.cxx.
|
inline |
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.
Definition at line 53 of file graphicsPipe.I.
|
inline |
Returns the height of the entire display, if it is known.
This may return 0. See the caveats for get_display_width().
Definition at line 95 of file graphicsPipe.h.
DisplayInformation * GraphicsPipe::get_display_information |
Gets the pipe's DisplayInformation.
Definition at line 98 of file graphicsPipe.h.
|
inline |
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.
Definition at line 94 of file graphicsPipe.h.