Panda3D
Loading...
Searching...
No Matches
graphicsPipe.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file graphicsPipe.I
10 * @author frang
11 * @date 1999-03-07
12 */
13
14/**
15 * Returns false if this pipe is known to be invalid, meaning that an attempt
16 * to create a GraphicsWindow with the pipe will certainly fail. Returns true
17 * if the pipe is probably valid (is this case, an attempt to create a
18 * GraphicsWindow should succeed, but might still fail).
19 *
20 * Use the GraphicsEngine class to create a GraphicsWindow on a particular
21 * pipe.
22 */
23INLINE bool GraphicsPipe::
24is_valid() const {
25 return _is_valid;
26}
27
28/**
29 * Returns the mask of bits that represents the kinds of GraphicsOutput
30 * objects this pipe might be able to successfully create. The return value
31 * is the union of bits in GraphicsPipe::OutputTypes that represents the set
32 * of GraphicsOutput types.
33 *
34 * A 1 bit in a particular position is not a guarantee of success, but a 0 bit
35 * is a guarantee of failure.
36 */
38get_supported_types() const {
39 return _supported_types;
40}
41
42/**
43 * A convenience function to ask if a particular type or types of
44 * GraphicsObjects are supported. The parameter is a union of one or more
45 * bits defined in GrpahicsPipe::OutputTypes.
46 *
47 * Returns true if all of the requested types are listed in the
48 * supported_types mask, false if any one of them is not. This is not a
49 * guarantee that the indicated output type will successfully be created when
50 * it is attempted.
51 */
52INLINE bool GraphicsPipe::
53supports_type(int flags) const {
54 return (_supported_types & flags) == flags;
55}
56
57/**
58 * Returns the width of the entire display, if it is known. This may return
59 * 0. This is not a guarantee that windows (particularly fullscreen windows)
60 * may not be created larger than this width, but it is intended to provide a
61 * hint to the application.
62 */
63INLINE int GraphicsPipe::
64get_display_width() const {
65 return _display_width;
66}
67
68/**
69 * Returns the height of the entire display, if it is known. This may return
70 * 0. See the caveats for get_display_width().
71 */
72INLINE int GraphicsPipe::
73get_display_height() const {
74 return _display_height;
75}
76
77/**
78 * Returns a pointer to device object
79 */
81get_device() const {
82 return _device;
83}
An abstract device object that is part of Graphics Pipe.
GraphicsDevice * get_device() const
Returns a pointer to device object.
get_display_width
Returns the width of the entire display, if it is known.
bool supports_type(int flags) const
A convenience function to ask if a particular type or types of GraphicsObjects are supported.
bool is_valid() const
Returns false if this pipe is known to be invalid, meaning that an attempt to create a GraphicsWindow...
int get_supported_types() const
Returns the mask of bits that represents the kinds of GraphicsOutput objects this pipe might be able ...
get_display_height
Returns the height of the entire display, if it is known.