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 channelsint

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

property class_slotint
getChannels()int

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

static getClassSlot()int
static getClassType()TypeHandle
static make(channels: int)RenderAttrib

Constructs a new ColorWriteAttrib object.

static makeDefault()RenderAttrib

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