PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...
#include "eggRenderState.h"
#include "eggRenderMode.h"
#include "eggLine.h"
#include "eggPoint.h"
#include "textureAttrib.h"
#include "renderAttrib.h"
#include "eggTexture.h"
#include "texGenAttrib.h"
#include "internalName.h"
#include "eggCurve.h"
#include "eggSurface.h"
#include "cullBinAttrib.h"
#include "cullFaceAttrib.h"
#include "shadeModelAttrib.h"
#include "transparencyAttrib.h"
#include "depthWriteAttrib.h"
#include "depthTestAttrib.h"
#include "depthOffsetAttrib.h"
#include "texMatrixAttrib.h"
#include "renderModeAttrib.h"
#include "material.h"
#include "materialAttrib.h"
#include "materialPool.h"
#include "config_gobj.h"
#include "config_egg2pg.h"
Go to the source code of this file.
Functions | |
CPT (RenderAttrib) EggRenderState | |
Returns a RenderAttrib suitable for enabling the material indicated by the given EggMaterial, and with the indicated backface flag. More... | |
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."
Definition in file eggRenderState.cxx.
CPT | ( | RenderAttrib | ) |
Returns a RenderAttrib suitable for enabling the material indicated by the given EggMaterial, and with the indicated backface flag.
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned on by this attrib.
Constructs a new TextureAttrib object that turns off all stages (and hence disables texturing).
Constructs a new TextureAttrib object that does nothing.
Constructs a new TextureAttrib object suitable for rendering untextured geometry.
Returns a new TexMatrixAttrib just like this one, with the indicated transform for the given stage.
Constructs a TexMatrixAttrib that applies the indicated transform to the named texture stage.
Constructs a TexMatrixAttrib that applies the indicated matrix to the default texture stage.
Returns a new TexGenAttrib just like this one, with the indicated generation mode for the given stage.
Constructs a TexGenAttrib that generates just the indicated stage.
Constructs a two-sided StencilAttrib.
Constructs a front face StencilAttrib.
Set auto shader with bitmask to customize use, e.g., to keep normal, glow, etc., on or off.
Constructs a new ShaderAttrib object with nothing set.
Constructs a ScissorAttrib that restricts rendering to the indicated frame within the current DisplayRegion.
This function is used by derived RenderAttrib types to share a common RenderAttrib pointer for all equivalent RenderAttrib objects.
Constructs a new MaterialAttrib object suitable for rendering unmateriald geometry.
Constructs a new LogicOpAttrib object with the given logic operation.
Constructs a new LightRampAttrib object.
Returns a new LightAttrib, just like this one, but with the indicated light added to the list of lights turned on by this attrib.
Constructs a new LightAttrib object that turns off all lights (and hence disables lighting).
Returns a new LightAttrib, just like this one, but with the indicated light added to the list of lights.
Constructs a new LightAttrib object that turns on (or off, according to op) the indicate light(s).
Constructs a new FogAttrib object suitable for rendering unfogd geometry.
Constructs a new DepthOffsetAttrib object that indicates the bias, and also specifies a minimum and maximum (or, more precisely, nearest and farthest) values to write to the depth buffer, in the range 0 .
Constructs a new CullFaceAttrib object that reverses the effects of any other CullFaceAttrib objects in the scene graph.
Returns a new ColorScaleAttrib, just like this one, but with the scale changed to the indicated value.
Constructs a new ColorScaleAttrib object that ignores any ColorScaleAttrib inherited from above.
Constructs a new ColorScaleAttrib object that indicates geometry should be scaled by the indicated factor.
Constructs a new ColorBlendAttrib object that enables special-effect blending.
Constructs a new ColorBlendAttrib object.
Constructs a new ColorAttrib object that indicates geometry should be rendered in white.
Constructs a new ColorAttrib object that indicates geometry should be rendered in the indicated color.
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes enabled by this attrib.
Constructs a new ClipPlaneAttrib object that disables all planes (and hence disables clipping).
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes.
Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s).
Constructs a specified AuxBitplaneAttrib object.
Returns a new AudioVolumeAttrib, just like this one, but with the volume changed to the indicated value.
Constructs a new AudioVolumeAttrib object that ignores any AudioVolumeAttrib inherited from above.
Constructs a new AudioVolumeAttrib object that indicates audio volume should be scaled by the indicated factor.
Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
Applies the texture matrix from the indicated egg texture to the given TexMatrixAttrib, and returns the new attrib.
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. Tells the BamReader how to create objects of type AntialiasAttrib.
You may also specify an additional volume scale to apply to geometry below (using set_volume()).
Intended to be overridden by derived AudioVolumeAttrib types to return a unique number indicating whether this AudioVolumeAttrib is equivalent to the other one.
This should return 0 if the two AudioVolumeAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two AudioVolumeAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
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(). Tells the BamReader how to create objects of type AudioVolumeAttrib.
This method is now deprecated. Use add_on_plane() or add_off_plane() instead.
This method is now deprecated. Use add_on_plane() or add_off_plane() instead. Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes.
This method is now deprecated. Use remove_on_plane() or remove_off_plane() instead. Constructs a new ClipPlaneAttrib object that does nothing.
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes enabled by this attrib. Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes disabled by this attrib. Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes disabled by this attrib. Returns a new ClipPlaneAttrib, very much like this one, but with the number of on_planes reduced to be no more than max_clip_planes. The number of off_planes in the new ClipPlaneAttrib is undefined. This is a special method which composes two ClipPlaneAttribs with regard only to their set of "off" clip planes, for the purposes of deriving PandaNode::get_off_clip_planes().
The result will be a ClipPlaneAttrib that represents the union of all of the clip planes turned off in either attrib. The set of on planes in the result is undefined and should be ignored. Intended to be overridden by derived ClipPlaneAttrib types to return a unique number indicating whether this ClipPlaneAttrib is equivalent to the other one.
This should return 0 if the two ClipPlaneAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two ClipPlaneAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
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(). This is patterned after TextureAttrib::sort_on_stages(), but since planeNodes don't actually require sorting, this only empties the _filtered map.
This constructor is deprecated; use the one below, which takes three or four parameters, instead.
This supercedes transparency. The given mode and operands are used for both the RGB and alpha channels.
This supercedes transparency. This form is used to specify separate blending parameters for the RGB and alpha channels.
You may also specify an additional color scale to apply to geometry below (using set_scale()).
Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
This should return false if a RenderAttrib on a higher node will compose into a RenderAttrib on a lower node that has a higher override value, or false if the lower RenderAttrib will completely replace the state.
The default behavior is false: normally, a RenderAttrib in the graph cannot completely override a RenderAttrib above it, regardless of its override value–instead, the two attribs are composed. But for some kinds of RenderAttribs, it is useful to allow this kind of override.
This method only handles the one special case of a lower RenderAttrib with a higher override value. If the higher RenderAttrib has a higher override value, it always completely overrides. And if both RenderAttribs have the same override value, they are always composed. Intended to be overridden by derived ColorScaleAttrib types to return a unique number indicating whether this ColorScaleAttrib is equivalent to the other one.
This should return 0 if the two ColorScaleAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two ColorScaleAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
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(). Quantizes the color scale to the nearest multiple of 1024, just to prevent runaway accumulation of only slightly-different ColorScaleAttribs.
M_cull_clockwise will be treated as M_cull_counter_clockwise, and vice-versa. M_cull_none is unchanged.
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(). Tells the BamReader how to create objects of type CullFaceAttrib.
. 1. This range is 0, 1 by default; setting it to some other range can be used to create additional depth buffer effects.
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(). Tells the BamReader how to create objects of type DepthOffsetAttrib.
This method is now deprecated. Use add_on_light() or add_off_light() instead.
This method is now deprecated. Use add_on_light() or add_off_light() instead. Returns a new LightAttrib, just like this one, but with the indicated light removed from the list of lights.
This method is now deprecated. Use remove_on_light() or remove_off_light() instead. Constructs a new LightAttrib object that does nothing.
Returns a new LightAttrib, just like this one, but with the indicated light removed from the list of lights turned on by this attrib. Returns a new LightAttrib, just like this one, but with the indicated light added to the list of lights turned off by this attrib. Returns a new LightAttrib, just like this one, but with the indicated light removed from the list of lights turned off by this attrib. Returns the most important light (that is, the light with the highest priority) in the LightAttrib, excluding any ambient lights. Returns an empty NodePath if no non-ambient lights are found. Returns the total contribution of all the ambient lights. Intended to be overridden by derived LightAttrib types to return a unique number indicating whether this LightAttrib is equivalent to the other one.
This should return 0 if the two LightAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two LightAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
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(). Makes sure the lights are sorted in order of priority. Also counts the number of non-ambient lights.
This differs from the usual OpenGL lighting model in that it does not clamp the final lighting total to (0,1).
This causes the luminance of the diffuse lighting contribution to be quantized using a single threshold:
This causes the luminance of the diffuse lighting contribution to be quantized using two thresholds:
This causes an HDR tone mapping operation to be applied.
Normally, brightness values greater than 1 cannot be distinguished from each other, causing very brightly lit objects to wash out white and all detail to be erased. HDR tone mapping remaps brightness values in the range 0-infinity into the range (0,1), making it possible to distinguish detail in scenes whose brightness exceeds 1.
However, the monitor has finite contrast. Normally, all of that contrast is used to represent brightnesses in the range 0-1. The HDR0 tone mapping operator 'steals' one quarter of that contrast to represent brightnesses in the range 1-infinity.
This causes an HDR tone mapping operation to be applied.
Normally, brightness values greater than 1 cannot be distinguished from each other, causing very brightly lit objects to wash out white and all detail to be erased. HDR tone mapping remaps brightness values in the range 0-infinity into the range (0,1), making it possible to distinguish detail in scenes whose brightness exceeds 1.
However, the monitor has finite contrast. Normally, all of that contrast is used to represent brightnesses in the range 0-1. The HDR1 tone mapping operator 'steals' one third of that contrast to represent brightnesses in the range 1-infinity.
This causes an HDR tone mapping operation to be applied.
Normally, brightness values greater than 1 cannot be distinguished from each other, causing very brightly lit objects to wash out white and all detail to be erased. HDR tone mapping remaps brightness values in the range 0-infinity into the range (0,1), making it possible to distinguish detail in scenes whose brightness exceeds 1.
However, the monitor has finite contrast. Normally, all of that contrast is used to represent brightnesses in the range 0-1. The HDR2 tone mapping operator 'steals' one half of that contrast to represent brightnesses in the range 1-infinity.
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.
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. Tells the BamReader how to create objects of type RenderModeAttrib.
(0,0) is the lower-left corner of the DisplayRegion, and (1,1) is the upper-right corner.
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. Tells the BamReader how to create objects of type ScissorAttrib.
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. Tells the BamReader how to create objects of type ShadeModelAttrib.
Sets the geometry instance count. Do not confuse this with instanceTo, which is used for animation instancing, and has nothing to do with this. A value of 0 means not to use instancing at all. Clears all the shader inputs on the attrib. Returns the ShaderInput of the given name. If no such name is found, this function does not return NULL — it returns the "blank" ShaderInput. Returns the ShaderInput of the given name. If no such name is found, this function does not return NULL — it returns the "blank" ShaderInput. Returns the ShaderInput as a nodepath. Assertion fails if there is none, or if it is not a nodepath. Returns the ShaderInput as a vector. Assertion fails if there is none, or if it is not a vector. Returns the ShaderInput as a ShaderPtrData struct. Assertion fails if there is none. or if it is not a PTA(double/float) Returns the ShaderInput as a texture. Assertion fails if there is none, or if it is not a texture.
If sampler is not NULL, the sampler state to use for this texture is assigned to it. Returns the ShaderInput as a matrix. Assertion fails if there is none, or if it is not a matrix or NodePath. Returns the ShaderInput as a ShaderBuffer. Assertion fails if there is none, or if it is not a ShaderBuffer. Returns the shader object associated with the node. If get_override returns true, but get_shader returns NULL, that means that this attribute should disable the shader. Intended to be overridden by derived ShaderAttrib types to return a unique number indicating whether this ShaderAttrib is equivalent to the other one.
This should return 0 if the two ShaderAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two ShaderAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Factory method to generate a Shader object
If this stage already exists, its mode is replaced. Returns a new TexGenAttrib just like this one, with the indicated generation mode for the given stage. If this stage already exists, its mode is replaced.
This variant also accepts constant_value, which is only meaningful if mode is M_constant. Returns a new TexGenAttrib just like this one, with the indicated stage removed. Returns true if no stages are defined in the TexGenAttrib, false if at least one is. Returns true if there is a mode associated with the indicated stage, or false otherwise (in which case get_transform(stage) will return M_off). Returns the generation mode associated with the named texture stage, or M_off if nothing is associated with the indicated stage. Returns true if the indicated TextureStage will have texture coordinates generated for it automatically (and thus there is no need to upload the texture coordinates encoded in the vertices). Returns the constant value associated with the named texture stage. This is only meaningful if the mode is M_constant. Intended to be overridden by derived TexGenAttrib types to return a unique number indicating whether this TexGenAttrib is equivalent to the other one.
This should return 0 if the two TexGenAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two TexGenAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
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(). This method is to be called after the _stages map has been built up internally through some artificial means; it copies the appropriate settings to _no_texcoords and updates other internal cache values appropriately.
This interface is deprecated.
If this stage already exists, its transform is replaced. Returns a new TexMatrixAttrib just like this one, with the indicated stage removed. Returns the transformation matrix associated with the default texture stage. Returns true if no stages are defined in the TexMatrixAttrib, false if at least one is. Returns true if there is a transform associated with the indicated stage, or false otherwise (in which case get_transform(stage) will return the identity transform). Returns the number of stages that are represented by this attrib. Returns the nth stage that is represented by this attrib. The TextureStages are in no particular order. Returns the transformation matrix associated with the indicated texture stage, or identity matrix if nothing is associated with the indicated stage. Returns the transformation associated with the indicated texture stage, or identity matrix if nothing is associated with the indicated stage. Intended to be overridden by derived TexMatrixAttrib types to return a unique number indicating whether this TexMatrixAttrib is equivalent to the other one.
This should return 0 if the two TexMatrixAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two TexMatrixAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
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(). Tells the BamReader how to create objects of type TexMatrixAttrib.
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned on by this attrib. Returns a new TextureAttrib, just like this one, but with the indicated stage removed from the list of stages turned on by this attrib. Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned off by this attrib. Returns a new TextureAttrib, just like this one, but with the indicated stage removed from the list of stages turned off by this attrib. Returns a new TextureAttrib, just like this one, but with any included TextureAttribs that happen to have the same name as the given object replaced with the object. Returns a new TextureAttrib, very much like this one, but with the number of on_stages reduced to be no more than max_texture_stages. The number of off_stages in the new TextureAttrib is undefined. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
This should return false if a RenderAttrib on a higher node will compose into a RenderAttrib on a lower node that has a higher override value, or false if the lower RenderAttrib will completely replace the state.
The default behavior is false: normally, a RenderAttrib in the graph cannot completely override a RenderAttrib above it, regardless of its override value–instead, the two attribs are composed. But for some kinds of RenderAttribs, it is useful to allow this kind of override.
This method only handles the one special case of a lower RenderAttrib with a higher override value. If the higher RenderAttrib has a higher override value, it always completely overrides. And if both RenderAttribs have the same override value, they are always composed. Should be overridden by derived classes to return true if cull_callback() has been defined. Otherwise, returns false to indicate cull_callback() does not need to be called for this node during the cull traversal. If has_cull_callback() returns true, this function will be called during the cull traversal to perform any additional operations that should be performed at cull time.
This is called each time the RenderAttrib is discovered applied to a Geom in the traversal. It should return true if the Geom is visible, false if it should be omitted. Intended to be overridden by derived TextureAttrib types to return a unique number indicating whether this TextureAttrib is equivalent to the other one.
This should return 0 if the two TextureAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two TextureAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
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(). Tells the BamReader how to create objects of type TextureAttrib.
Definition at line 474 of file eggRenderState.cxx.