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
unsigned int get_channels(void) const

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

static int get_class_slot(void)
static TypeHandle get_class_type(void)
static ConstPointerTo<RenderAttrib> make(unsigned int channels)

Constructs a new ColorWriteAttrib object.

static ConstPointerTo<RenderAttrib> make_default(void)

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