Panda3D

graphicsPipe.I

00001 // Filename: graphicsPipe.I
00002 // Created by:  frang (07Mar99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: GraphicsPipe::is_valid
00018 //       Access: Published
00019 //  Description: Returns false if this pipe is known to be invalid,
00020 //               meaning that an attempt to create a GraphicsWindow
00021 //               with the pipe will certainly fail.  Returns true if
00022 //               the pipe is probably valid (is this case, an attempt
00023 //               to create a GraphicsWindow should succeed, but might
00024 //               still fail).
00025 //
00026 //               Use the GraphicsEngine class to create a
00027 //               GraphicsWindow on a particular pipe.
00028 ////////////////////////////////////////////////////////////////////
00029 INLINE bool GraphicsPipe::
00030 is_valid() const {
00031   return _is_valid;
00032 }
00033 
00034 ////////////////////////////////////////////////////////////////////
00035 //     Function: GraphicsPipe::get_supported_types
00036 //       Access: Published
00037 //  Description: Returns the mask of bits that represents the kinds of
00038 //               GraphicsOutput objects this pipe might be able to
00039 //               successfully create.  The return value is the union
00040 //               of bits in GraphicsPipe::OutputTypes that represents
00041 //               the set of GraphicsOutput types.
00042 //
00043 //               A 1 bit in a particular position is not a guarantee
00044 //               of success, but a 0 bit is a guarantee of failure.
00045 ////////////////////////////////////////////////////////////////////
00046 INLINE int GraphicsPipe::
00047 get_supported_types() const {
00048   return _supported_types;
00049 }
00050 
00051 ////////////////////////////////////////////////////////////////////
00052 //     Function: GraphicsPipe::supports_type
00053 //       Access: Published
00054 //  Description: A convenience function to ask if a particular type or
00055 //               types of GraphicsObjects are supported.  The
00056 //               parameter is a union of one or more bits defined in
00057 //               GrpahicsPipe::OutputTypes.
00058 //
00059 //               Returns true if all of the requested types are listed
00060 //               in the supported_types mask, false if any one of them
00061 //               is not.  This is not a guarantee that the indicated
00062 //               output type will successfully be created when it is
00063 //               attempted.
00064 ////////////////////////////////////////////////////////////////////
00065 INLINE bool GraphicsPipe::
00066 supports_type(int flags) const {
00067   return (_supported_types & flags) == flags;
00068 }
00069 
00070 ////////////////////////////////////////////////////////////////////
00071 //     Function: GraphicsPipe::get_display_width
00072 //       Access: Published
00073 //  Description: Returns the width of the entire display, if it is
00074 //               known.  This may return 0.  This is not a guarantee
00075 //               that windows (particularly fullscreen windows) may
00076 //               not be created larger than this width, but it is
00077 //               intended to provide a hint to the application.
00078 ////////////////////////////////////////////////////////////////////
00079 INLINE int GraphicsPipe::
00080 get_display_width() const {
00081   return _display_width;
00082 }
00083 
00084 ////////////////////////////////////////////////////////////////////
00085 //     Function: GraphicsPipe::get_display_height
00086 //       Access: Published
00087 //  Description: Returns the height of the entire display, if it is
00088 //               known.  This may return 0.  See the caveats for
00089 //               get_display_width().
00090 ////////////////////////////////////////////////////////////////////
00091 INLINE int GraphicsPipe::
00092 get_display_height() const {
00093   return _display_height;
00094 }
00095 
00096 ////////////////////////////////////////////////////////////////////
00097 //     Function: GraphicsPipe::get_device
00098 //       Access: Public
00099 //  Description: Returns a pointer to device object
00100 ////////////////////////////////////////////////////////////////////
00101 INLINE GraphicsDevice *GraphicsPipe::
00102 get_device() const {
00103   return _device;
00104 }
00105 
 All Classes Functions Variables Enumerations