panda3d.core.ColorWriteAttrib

from panda3d.core import ColorWriteAttrib
class ColorWriteAttrib

Bases: RenderAttrib

Enables or disables writing to the color buffer. This is primarily useful for certain special effects in which it is important to write to the depth buffer without affecting the color buffer.

Inheritance diagram

Inheritance diagram of ColorWriteAttrib

enum Channels
enumerator C_off = 0

By coincidence, these bits are the same as those for D3DCOLORWRITEENABLE_RED, _GREEN, _BLUE, and _ALPHA.

enumerator C_red = 1
enumerator C_green = 2
enumerator C_blue = 4
enumerator C_rgb = 7

== C_red | C_green | C_blue

enumerator C_alpha = 8
enumerator C_all = 15
property channels

Returns the mask of color channels that are enabled by this attrib.

Return type

int

property class_slot
Return type

int

getChannels() → int

Returns the mask of color channels that are enabled by this attrib.

static getClassSlot() → int
static getClassType() → TypeHandle
Return type

TypeHandle

static make(channels: int) → RenderAttrib

Constructs a new ColorWriteAttrib object.

Return type

RenderAttrib

static makeDefault() → RenderAttrib

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

Return type

RenderAttrib