Panda3D
Functions
renderAttrib.cxx File Reference

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

#include "renderAttrib.h"
#include "bamReader.h"
#include "indent.h"
#include "config_pgraph.h"
#include "lightReMutexHolder.h"
#include "pStatTimer.h"

Go to the source code of this file.

Functions

 CPT (RenderAttrib) RenderAttrib
 This function is used by derived RenderAttrib types to share a common RenderAttrib pointer for all equivalent RenderAttrib objects. 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 renderAttrib.cxx.

Function Documentation

◆ CPT()

CPT ( RenderAttrib  )

This function is used by derived RenderAttrib types to share a common RenderAttrib pointer for all equivalent RenderAttrib objects.

Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

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

The make() function of the derived type should create a new RenderAttrib and pass it through return_new(), which will either save the pointer and return it unchanged (if this is the first similar such object) or delete it and return an equivalent pointer (if there was already a similar object saved).

This should return the result of applying the other RenderAttrib to a node in the scene graph below this RenderAttrib, which was already applied. In most cases, the result is the same as the other RenderAttrib (that is, a subsequent RenderAttrib completely replaces the preceding one). On the other hand, some kinds of RenderAttrib (for instance, ColorTransformAttrib) might combine in meaningful ways. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

See invert_compose() and compose_impl(). Outputs a string representation of the given PandaCompareFunc object. This inverse of return_new, this releases this object from the global RenderAttrib table.

You must already be holding _attribs_lock before you call this method.

Definition at line 319 of file renderAttrib.cxx.