Panda3D

Functions
renderState.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

`#include "renderState.h"`
`#include "transparencyAttrib.h"`
`#include "cullBinAttrib.h"`
`#include "cullBinManager.h"`
`#include "fogAttrib.h"`
`#include "clipPlaneAttrib.h"`
`#include "scissorAttrib.h"`
`#include "colorAttrib.h"`
`#include "colorScaleAttrib.h"`
`#include "textureAttrib.h"`
`#include "texGenAttrib.h"`
`#include "shaderAttrib.h"`
`#include "pStatTimer.h"`
`#include "config_pgraph.h"`
`#include "bamReader.h"`
`#include "bamWriter.h"`
`#include "datagramIterator.h"`
`#include "indent.h"`
`#include "compareTo.h"`
`#include "lightReMutexHolder.h"`
`#include "lightMutexHolder.h"`
`#include "thread.h"`
`#include "renderAttribRegistry.h"`

Go to the source code of this file.

## Functions
| CPT (RenderState) RenderState
| Returns a RenderState with one attribute set. More...

## Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
  drose

Date
  2002-02-21

Definition in file renderState.cxx.

## Function Documentation

## ◆ CPT()

CPT | ( | RenderState |  | ) |

Returns a RenderState with one attribute set.

The private implemention of compose(); this actually composes two RenderStates, without bothering with the cache.

This function is used to share a common RenderState pointer for all equivalent RenderState objects.

Returns a new RenderState object that represents the composition of this state with the other state.

Returns a RenderState with n attributes set.

Returns a RenderState with five attributes set.

Returns a RenderState with four attributes set.

Returns a RenderState with three attributes set.

Returns a RenderState with two attributes set.

The result of this operation is cached, and will be retained as long as both this RenderState object and the other RenderState object continue to exist. Should one of them destruct, the cached entry will be removed, and its pointer will be allowed to destruct as well.

Returns a new RenderState object that represents the composition of this state's inverse with the other state.

This is similar to compose(), but is particularly useful for computing the relative state of a node as viewed from some other node.

Returns a new RenderState object that represents the same as the source state, with the new RenderAttrib added. If there is already a RenderAttrib with the same type, it is replaced (unless the override is lower).

Returns a new RenderState object that represents the same as the source state, with the new RenderAttrib added. If there is already a RenderAttrib with the same type, it is replaced unconditionally. The override is not changed.

Returns a new RenderState object that represents the same as the source state, with the new RenderAttrib added. If there is already a RenderAttrib with the same type, it is replaced unconditionally. The override is also replaced unconditionally.

Returns a new RenderState object that represents the same as the source state, with the indicated RenderAttrib removed.

Returns a new RenderState object that represents the same as the source state, with all attributes' override values incremented (or decremented, if negative) by the indicated amount. If the override would drop below zero, it is set to zero.

This method overrides ReferenceCount::unref() to check whether the remaining reference count is entirely in the cache, and if so, it checks for and breaks a cycle in the cache involving this object. This is designed to prevent leaks from cyclical references within the cache.

Returns the maximum priority number (sometimes called override) that may be set on any node. This may or may not be enforced, but the scene graph code assumes that no priority numbers will be larger than this, and some effects may not work properly if you use a larger number.

This is different from return_unique() in that it does not actually guarantee a unique pointer, unless uniquify-states is set.

See the similar logic in RenderAttrib. The idea is to create a new RenderState object and pass it through this function, which will share the pointer with a previously-created RenderState object if it is equivalent.

The private implemention of invert_compose().

Detects whether there is a cycle in the cache that begins with this state. If any are detected, breaks them by removing this state from the cache.

Definition at line 234 of file renderState.cxx.

References BitMask< WType, nbits >::set_bit().