PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...
#include "pandabase.h"
#include "shaderAttrib.h"
#include "graphicsStateGuardianBase.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "nodePath.h"
#include "paramNodePath.h"
#include "paramTexture.h"
#include "shaderBuffer.h"
Go to the source code of this file.
Functions | |
CPT (RenderAttrib) ShaderAttrib | |
Constructs a new ShaderAttrib object that disables the use of shaders (it does not clear out all shader data, however.) 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 shaderAttrib.cxx.
CPT | ( | RenderAttrib | ) |
Constructs a new ShaderAttrib object that disables the use of shaders (it does not clear out all shader data, however.)
Set auto shader with bitmask to customize use, e.g., to keep normal, glow, etc., on or off.
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
Constructs a new ShaderAttrib object with nothing set.
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
Definition at line 42 of file shaderAttrib.cxx.