Panda3D
|
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before we create a GSG. More...
Public Member Functions | |
__init__ () | |
__init__ (const FrameBufferProperties) | |
addProperties (const FrameBufferProperties other) | |
Sets any properties that are explicitly specified in other on this object. More... | |
clear () | |
Unsets all properties that have been specified so far, and resets the FrameBufferProperties structure to its initial empty state. More... | |
int | getAccumBits () |
int | getAlphaBits () |
int | getAuxFloat () |
int | getAuxHrgba () |
int | getAuxMask () |
Converts the aux bitplanes of the framebuffer into a RenderBuffer::Type. More... | |
int | getAuxRgba () |
int | getBackBuffers () |
int | getBlueBits () |
int | getBufferMask () |
Converts the non-aux bitplanes of the framebuffer into a RenderBuffer::Type. More... | |
int | getColorBits () |
int | getCoverageSamples () |
If coverage samples are specified, and there is hardware support, we use coverage multisampling. More... | |
int | getDepthBits () |
bool | getFloatColor () |
bool | getFloatDepth () |
bool | getForceHardware () |
bool | getForceSoftware () |
int | getGreenBits () |
bool | getIndexedColor () |
int | getMultisamples () |
int | getQuality (const FrameBufferProperties reqs) |
Assumes that these properties are a description of a window. More... | |
int | getRedBits () |
bool | getRgbColor () |
bool | getSrgbColor () |
int | getStencilBits () |
bool | getStereo () |
bool | isAnySpecified () |
Returns true if any properties have been specified, false otherwise. More... | |
bool | isBasic () |
Returns true if the properties are extremely basic. More... | |
bool | isSingleBuffered () |
bool | isStereo () |
bool | operator!= (const FrameBufferProperties other) |
bool | operator== (const FrameBufferProperties other) |
output (Ostream out) | |
Generates a string representation. More... | |
setAccumBits (int n) | |
setAllSpecified () | |
Marks all bits as having been specified. More... | |
setAlphaBits (int n) | |
setAuxFloat (int n) | |
setAuxHrgba (int n) | |
setAuxRgba (int n) | |
setBackBuffers (int n) | |
setBlueBits (int n) | |
setColorBits (int n) | |
Sets the number of requested color bits as a single number that represents the sum of the individual numbers of red, green and blue bits. More... | |
setCoverageSamples (int n) | |
If coverage samples are specified, and there is hardware support, we use coverage multisampling. More... | |
setDepthBits (int n) | |
setFloatColor (bool n) | |
setFloatDepth (bool n) | |
setForceHardware (bool n) | |
setForceSoftware (bool n) | |
setGreenBits (int n) | |
setIndexedColor (bool n) | |
setMultisamples (int n) | |
setOneBitPerChannel () | |
If any of the depth, color, alpha, accum, or stencil properties is set to more than one, then they are reduced to one. More... | |
setRedBits (int n) | |
setRgbaBits (int r, int g, int b, int a) | |
Convenience method for setting the red, green, blue and alpha bits in one go. More... | |
setRgbColor (bool n) | |
setSrgbColor (bool n) | |
setStencilBits (int n) | |
setStereo (bool n) | |
bool | setupColorTexture (Texture tex) |
Sets the texture up for render-to-texture matching these framebuffer properties. More... | |
bool | setupDepthTexture (Texture tex) |
Sets the texture up for render-to-texture matching these framebuffer properties. More... | |
bool | subsumes (const FrameBufferProperties other) |
Returns true if this set of properties makes strictly greater or equal demands of the framebuffer than the other set of framebuffer properties. More... | |
bool | verifyHardwareSoftware (const FrameBufferProperties props, str renderer) |
Validates that the properties represent the desired kind of renderer (hardware or software). More... | |
Static Public Member Functions | |
static const FrameBufferProperties | getDefault () |
Returns a FrameBufferProperties structure with all of the default values filled in according to the user's config file. More... | |
Public Attributes | |
int | accum_bits |
int | alpha_bits |
int | aux_float |
int | aux_hrgba |
int | aux_rgba |
int | back_buffers |
int | blue_bits |
int | color_bits |
int | coverage_samples |
If coverage samples are specified, and there is hardware support, we use coverage multisampling. More... | |
int | depth_bits |
Individual queries. More... | |
bool | float_color |
bool | float_depth |
bool | force_hardware |
bool | force_software |
int | green_bits |
bool | indexed_color |
int | multisamples |
int | red_bits |
bool | rgb_color |
bool | srgb_color |
int | stencil_bits |
bool | stereo |
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before we create a GSG.
__init__ | ( | ) |
__init__ | ( | const | FrameBufferProperties | ) |
addProperties | ( | const FrameBufferProperties | other | ) |
Sets any properties that are explicitly specified in other on this object.
Leaves other properties unchanged.
clear | ( | ) |
Unsets all properties that have been specified so far, and resets the FrameBufferProperties structure to its initial empty state.
int getAccumBits | ( | ) |
int getAlphaBits | ( | ) |
int getAuxFloat | ( | ) |
int getAuxHrgba | ( | ) |
int getAuxMask | ( | ) |
Converts the aux bitplanes of the framebuffer into a RenderBuffer::Type.
int getAuxRgba | ( | ) |
int getBackBuffers | ( | ) |
int getBlueBits | ( | ) |
int getBufferMask | ( | ) |
Converts the non-aux bitplanes of the framebuffer into a RenderBuffer::Type.
int getColorBits | ( | ) |
int getCoverageSamples | ( | ) |
If coverage samples are specified, and there is hardware support, we use coverage multisampling.
|
static |
Returns a FrameBufferProperties structure with all of the default values filled in according to the user's config file.
int getDepthBits | ( | ) |
bool getFloatColor | ( | ) |
bool getFloatDepth | ( | ) |
bool getForceHardware | ( | ) |
bool getForceSoftware | ( | ) |
int getGreenBits | ( | ) |
bool getIndexedColor | ( | ) |
int getMultisamples | ( | ) |
int getQuality | ( | const FrameBufferProperties | reqs | ) |
Assumes that these properties are a description of a window.
Measures how well this window satisfies a specified set of requirements. A higher quality number means that more requirements were satisfied. A quality of zero means that the window is unsuitable.
The routine deducts a lot if the window fails to provide a requested feature. It deducts less if the window provides a feature, but at a degraded level of functionality (ie, the user asks for rgba8, color, but the window only provides rgba4). The routine also deducts a small amount for unnecessary features. For example, if the window has an accumulation buffer when one is not requested will reduce quality slightly. Maximum quality is obtained when the window exactly matches the request.
If you want to know whether the window satisfies all of the requirements, use the "subsumes" function.
int getRedBits | ( | ) |
bool getRgbColor | ( | ) |
bool getSrgbColor | ( | ) |
int getStencilBits | ( | ) |
bool getStereo | ( | ) |
bool isAnySpecified | ( | ) |
Returns true if any properties have been specified, false otherwise.
bool isBasic | ( | ) |
Returns true if the properties are extremely basic.
The following count as basic: rgb or rgba, depth. If anything else is specified, the properties are non-basic.
bool isSingleBuffered | ( | ) |
bool isStereo | ( | ) |
bool operator!= | ( | const FrameBufferProperties | other | ) |
bool operator== | ( | const FrameBufferProperties | other | ) |
output | ( | Ostream | out | ) |
Generates a string representation.
setAccumBits | ( | int | n | ) |
setAllSpecified | ( | ) |
Marks all bits as having been specified.
setAlphaBits | ( | int | n | ) |
setAuxFloat | ( | int | n | ) |
setAuxHrgba | ( | int | n | ) |
setAuxRgba | ( | int | n | ) |
setBackBuffers | ( | int | n | ) |
setBlueBits | ( | int | n | ) |
setColorBits | ( | int | n | ) |
Sets the number of requested color bits as a single number that represents the sum of the individual numbers of red, green and blue bits.
Panda won't care how the individual bits are divided up.
See also set_rgba_bits, which allows you to specify requirements for the individual components.
setCoverageSamples | ( | int | n | ) |
If coverage samples are specified, and there is hardware support, we use coverage multisampling.
setDepthBits | ( | int | n | ) |
setFloatColor | ( | bool | n | ) |
setFloatDepth | ( | bool | n | ) |
setForceHardware | ( | bool | n | ) |
setForceSoftware | ( | bool | n | ) |
setGreenBits | ( | int | n | ) |
setIndexedColor | ( | bool | n | ) |
setMultisamples | ( | int | n | ) |
setOneBitPerChannel | ( | ) |
If any of the depth, color, alpha, accum, or stencil properties is set to more than one, then they are reduced to one.
setRedBits | ( | int | n | ) |
setRgbaBits | ( | int | r, |
int | g, | ||
int | b, | ||
int | a | ||
) |
Convenience method for setting the red, green, blue and alpha bits in one go.
setRgbColor | ( | bool | n | ) |
setSrgbColor | ( | bool | n | ) |
setStencilBits | ( | int | n | ) |
setStereo | ( | bool | n | ) |
bool setupColorTexture | ( | Texture | tex | ) |
Sets the texture up for render-to-texture matching these framebuffer properties.
Returns true if there was a format that had enough bits, false otherwise. Of course, this is no guarantee that a particular graphics back-end supports rendering to textures of that format.
bool setupDepthTexture | ( | Texture | tex | ) |
Sets the texture up for render-to-texture matching these framebuffer properties.
Returns true if there was a format that had enough bits, false otherwise. Of course, this is no guarantee that a particular graphics back-end supports rendering to textures of that format.
bool subsumes | ( | const FrameBufferProperties | other | ) |
Returns true if this set of properties makes strictly greater or equal demands of the framebuffer than the other set of framebuffer properties.
bool verifyHardwareSoftware | ( | const FrameBufferProperties | props, |
str | renderer | ||
) |
Validates that the properties represent the desired kind of renderer (hardware or software).
If not, prints out an error message and returns false.
int accum_bits |
int alpha_bits |
int aux_float |
int aux_hrgba |
int aux_rgba |
int back_buffers |
int blue_bits |
int color_bits |
int coverage_samples |
If coverage samples are specified, and there is hardware support, we use coverage multisampling.
int depth_bits |
Individual queries.
bool float_color |
bool float_depth |
bool force_hardware |
bool force_software |
int green_bits |
bool indexed_color |
int multisamples |
int red_bits |
bool rgb_color |
bool srgb_color |
int stencil_bits |
bool stereo |