panda3d.core.FrameBufferProperties

from panda3d.core import FrameBufferProperties
class FrameBufferProperties

A container for the various kinds of properties we might ask to have on a graphics frameBuffer before we create a GSG.

Inheritance diagram

Inheritance diagram of FrameBufferProperties

__init__() → None
__init__(param0: FrameBufferProperties) → None
property accum_bits

Getter Setter

Return type

int

addProperties(other: FrameBufferProperties) → None

Sets any properties that are explicitly specified in other on this object. Leaves other properties unchanged.

property alpha_bits

Getter Setter

Return type

int

property aux_float

Getter Setter

Return type

int

property aux_hrgba

Getter Setter

Return type

int

property aux_rgba

Getter Setter

Return type

int

property back_buffers

Getter Setter

Return type

int

property blue_bits

Getter Setter

Return type

int

clear() → None

Unsets all properties that have been specified so far, and resets the FrameBufferProperties structure to its initial empty state.

property color_bits

Getter Setter

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.

Return type

int

property coverage_samples
Getter

If coverage samples are specified, and there is hardware support, we use coverage multisampling.

Setter

If coverage samples are specified, and there is hardware support, we use coverage multisampling

Return type

int

property depth_bits

Individual queries.

Getter

Individual queries.

Individual queries.

Setter

Individual assigners.

Individual assigners.

Return type

int

property float_color

Getter Setter

Return type

bool

property float_depth

Getter Setter

Return type

bool

property force_hardware

Getter Setter

Return type

bool

property force_software

Getter Setter

Return type

bool

getAccumBits() → int
getAlphaBits() → int
getAuxFloat() → int
getAuxHrgba() → int
getAuxMask() → int

Converts the aux bitplanes of the framebuffer into a RenderBuffer::Type.

getAuxRgba() → int
getBackBuffers() → int
getBlueBits() → int
getBufferMask() → int

Converts the non-aux bitplanes of the framebuffer into a RenderBuffer::Type.

getColorBits() → int
getCoverageSamples() → int

If coverage samples are specified, and there is hardware support, we use coverage multisampling.

static getDefault() → FrameBufferProperties

Returns a FrameBufferProperties structure with all of the default values filled in according to the user’s config file.

Return type

FrameBufferProperties

getDepthBits() → int

Individual queries.

getFloatColor() → bool
getFloatDepth() → bool
getForceHardware() → bool
getForceSoftware() → bool
getGreenBits() → int
getIndexedColor() → bool
getMultisamples() → int
getQuality(reqs: FrameBufferProperties) → int

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.

getRedBits() → int
getRgbColor() → bool
getSrgbColor() → bool
getStencilBits() → int
getStereo() → bool
property green_bits

Getter Setter

Return type

int

property indexed_color

Getter Setter

Return type

bool

isAnySpecified() → bool

Returns true if any properties have been specified, false otherwise.

isBasic() → bool

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.

isSingleBuffered() → bool
isStereo() → bool
property multisamples

Getter Setter

Return type

int

output(out: ostream) → None

Generates a string representation.

property red_bits

Getter Setter

Return type

int

property rgb_color

Getter Setter

Return type

bool

setAccumBits(n: int) → None
setAllSpecified() → None

Marks all bits as having been specified.

setAlphaBits(n: int) → None
setAuxFloat(n: int) → None
setAuxHrgba(n: int) → None
setAuxRgba(n: int) → None
setBackBuffers(n: int) → None
setBlueBits(n: int) → None
setColorBits(n: int) → None

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(n: int) → None

If coverage samples are specified, and there is hardware support, we use coverage multisampling

setDepthBits(n: int) → None

Individual assigners.

setFloatColor(n: bool) → None
setFloatDepth(n: bool) → None
setForceHardware(n: bool) → None
setForceSoftware(n: bool) → None
setGreenBits(n: int) → None
setIndexedColor(n: bool) → None
setMultisamples(n: int) → None
setOneBitPerChannel() → None

If any of the depth, color, alpha, accum, or stencil properties is set to more than one, then they are reduced to one.

setRedBits(n: int) → None
setRgbColor(n: bool) → None
setRgbaBits(r: int, g: int, b: int, a: int) → None

Convenience method for setting the red, green, blue and alpha bits in one go.

setSrgbColor(n: bool) → None
setStencilBits(n: int) → None
setStereo(n: bool) → None
setupColorTexture(tex: Texture) → bool

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.

setupDepthTexture(tex: Texture) → bool

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.

property srgb_color

Getter Setter

Return type

bool

property stencil_bits

Getter Setter

Return type

int

property stereo

Getter Setter

Return type

bool

subsumes(other: FrameBufferProperties) → bool

Returns true if this set of properties makes strictly greater or equal demands of the framebuffer than the other set of framebuffer properties.

verifyHardwareSoftware(props: FrameBufferProperties, renderer: str) → bool

Validates that the properties represent the desired kind of renderer (hardware or software). If not, prints out an error message and returns false.