Blender V2.61 - r43446
|
#include <shader.h>
Public Member Functions | |
virtual | ~ShaderManager () |
virtual void | device_update (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)=0 |
virtual void | device_free (Device *device, DeviceScene *dscene)=0 |
void | device_update_common (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
void | device_free_common (Device *device, DeviceScene *dscene) |
uint | get_attribute_id (ustring name) |
uint | get_attribute_id (Attribute::Standard std) |
int | get_shader_id (uint shader, Mesh *mesh=NULL, bool smooth=false) |
Static Public Member Functions | |
static ShaderManager * | create (Scene *scene) |
static void | add_default (Scene *scene) |
Public Attributes | |
bool | need_update |
Protected Types | |
typedef unordered_map< ustring, uint, ustringHash > | AttributeIDMap |
Protected Member Functions | |
ShaderManager () | |
Protected Attributes | |
AttributeIDMap | unique_attribute_id |
typedef unordered_map<ustring, uint, ustringHash> ShaderManager::AttributeIDMap [protected] |
ShaderManager::~ShaderManager | ( | ) | [virtual] |
Definition at line 107 of file shader.cpp.
ShaderManager::ShaderManager | ( | ) | [protected] |
Definition at line 102 of file shader.cpp.
References need_update.
void ShaderManager::add_default | ( | Scene * | scene | ) | [static] |
Definition at line 199 of file shader.cpp.
References ShaderGraph::add(), ShaderGraph::connect(), Scene::default_background, Scene::default_light, Scene::default_surface, Shader::graph, ShaderNode::input(), make_float3(), Shader::name, ShaderNode::output(), ShaderGraph::output(), Shader, Scene::shaders, ShaderInput::value, and float3::x.
Referenced by create().
ShaderManager * ShaderManager::create | ( | Scene * | scene | ) | [static] |
Definition at line 111 of file shader.cpp.
References add_default(), SceneParams::OSL, Scene::params, and SceneParams::shadingsystem.
virtual void ShaderManager::device_free | ( | Device * | device, |
DeviceScene * | dscene | ||
) | [pure virtual] |
Implemented in SVMShaderManager.
Referenced by Scene::~Scene().
void ShaderManager::device_free_common | ( | Device * | device, |
DeviceScene * | dscene | ||
) |
Definition at line 193 of file shader.cpp.
References device_vector< T >::clear(), DeviceScene::shader_flag, and Device::tex_free().
Referenced by SVMShaderManager::device_free(), and device_update_common().
virtual void ShaderManager::device_update | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) | [pure virtual] |
Implemented in SVMShaderManager.
Referenced by Scene::device_update().
void ShaderManager::device_update_common | ( | Device * | device, |
DeviceScene * | dscene, | ||
Scene * | scene, | ||
Progress & | progress | ||
) |
Definition at line 163 of file shader.cpp.
References device_free_common(), Render::flag, Shader::has_surface_transparent, Shader::has_volume, Shader::homogeneous_volume, i, device_vector< T >::resize(), Shader::sample_as_light, SD_HAS_SURFACE_TRANSPARENT, SD_HAS_VOLUME, SD_HOMOGENEOUS_VOLUME, SD_SAMPLE_AS_LIGHT, DeviceScene::shader_flag, Scene::shaders, and Device::tex_alloc().
Referenced by SVMShaderManager::device_update().
uint ShaderManager::get_attribute_id | ( | Attribute::Standard | std | ) |
Definition at line 140 of file shader.cpp.
uint ShaderManager::get_attribute_id | ( | ustring | name | ) |
Definition at line 127 of file shader.cpp.
References Render::name, Attribute::STD_NUM, and unique_attribute_id.
Referenced by SVMCompiler::attribute(), and MeshManager::update_svm_attributes().
Definition at line 145 of file shader.cpp.
References Mesh::DISPLACE_TRUE, Mesh::displacement_method, SHADER_AREA_LIGHT, SHADER_CAST_SHADOW, and SHADER_SMOOTH_NORMAL.
Referenced by Background::device_update(), LightManager::device_update_points(), and Mesh::pack_normals().
Definition at line 91 of file shader.h.
Referenced by SVMShaderManager::device_update(), Scene::need_reset(), ShaderManager(), and Shader::tag_update().
AttributeIDMap ShaderManager::unique_attribute_id [protected] |
Definition at line 118 of file shader.h.
Referenced by get_attribute_id().