Blender V2.61 - r43446
|
#include "DNA_listBase.h"
#include "GPU_material.h"
#include "GL/glew.h"
Go to the source code of this file.
Definition in file gpu_codegen.h.
#define FUNCTION_QUAL_IN 0 |
Definition at line 50 of file gpu_codegen.h.
Referenced by GPU_link(), gpu_parse_functions_string(), and GPU_stack_link().
#define FUNCTION_QUAL_INOUT 2 |
Definition at line 52 of file gpu_codegen.h.
Referenced by gpu_parse_functions_string().
#define FUNCTION_QUAL_OUT 1 |
Definition at line 51 of file gpu_codegen.h.
Referenced by gpu_parse_functions_string().
#define MAX_FUNCTION_NAME 64 |
Definition at line 47 of file gpu_codegen.h.
Referenced by gpu_parse_functions_string().
#define MAX_PARAMETER 32 |
Definition at line 48 of file gpu_codegen.h.
typedef enum GPUDataSource GPUDataSource |
typedef struct GPUFunction GPUFunction |
Definition at line 168 of file gpu_codegen.h.
enum GPUDataSource |
GPU_SOURCE_VEC_UNIFORM | |
GPU_SOURCE_BUILTIN | |
GPU_SOURCE_TEX_PIXEL | |
GPU_SOURCE_TEX | |
GPU_SOURCE_ATTRIB |
Definition at line 69 of file gpu_codegen.h.
const char* GPU_builtin_name | ( | GPUBuiltin | builtin | ) |
Definition at line 346 of file gpu_codegen.c.
References GPU_AUTO_BUMPSCALE, GPU_INVERSE_OBJECT_MATRIX, GPU_INVERSE_VIEW_MATRIX, GPU_OBCOLOR, GPU_OBJECT_MATRIX, GPU_VIEW_MATRIX, GPU_VIEW_NORMAL, and GPU_VIEW_POSITION.
Referenced by codegen_call_functions(), codegen_print_uniforms_functions(), GPU_material_construct_end(), and GPU_shader_export().
void GPU_codegen_exit | ( | void | ) |
Definition at line 249 of file gpu_codegen.c.
References BLI_ghash_free(), defmaterial, ListBase::first, glsl_material_library, GPU_material_free(), Material::gpumaterial, MEM_freeN(), and NULL.
Referenced by GPU_extensions_exit().
void GPU_codegen_init | ( | void | ) |
Definition at line 244 of file gpu_codegen.c.
References GPU_code_generate_glsl_lib().
Referenced by GPU_extensions_init().
GPUPass* GPU_generate_pass | ( | ListBase * | nodes, |
struct GPUNodeLink * | outlink, | ||
struct GPUVertexAttribs * | attribs, | ||
int * | builtin, | ||
const char * | name | ||
) |
Definition at line 1343 of file gpu_codegen.c.
References code_generate_fragment(), code_generate_vertex(), GPUPass::fragmentcode, glsl_material_library, GPU_nodes_extract_dynamic_inputs(), GPU_nodes_free(), gpu_nodes_get_builtin_flag(), gpu_nodes_get_vertex_attributes(), gpu_nodes_prune(), GPU_shader_create(), GPUPass::libcode, MEM_callocN(), NULL, GPUNodeLink::output, GPUPass::output, GPUPass::shader, and GPUPass::vertexcode.
Referenced by GPU_material_construct_end().
int GPU_link_changed | ( | struct GPUNodeLink * | link | ) |
Definition at line 1283 of file gpu_codegen.c.
References ListBase::first, GPUNode::inputs, GPUInput::link, GPUNode::name, GPUOutput::node, NULL, and GPUNodeLink::output.
Referenced by do_material_tex(), GPU_shaderesult_set(), and shade_one_light().
GPUFunction* GPU_lookup_function | ( | const char * | name | ) |
Definition at line 232 of file gpu_codegen.c.
References BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash(), glsl_material_library, and gpu_parse_functions_string().
Referenced by GPU_link(), GPU_stack_link(), and GPU_stack_link_mute().
void gpu_material_add_node | ( | struct GPUMaterial * | material, |
struct GPUNode * | node | ||
) |
Definition at line 370 of file gpu_material.c.
References BLI_addtail(), and GPUMaterial::nodes.
Referenced by GPU_link(), GPU_stack_link(), and GPU_stack_link_mute().
void GPU_pass_bind | ( | GPUPass * | pass, |
double | time, | ||
int | mipmap | ||
) |
Definition at line 747 of file gpu_codegen.c.
References GPUInput::bindtex, ListBase::first, GPU_shader_bind(), GPU_shader_uniform_texture(), GPU_texture_bind(), GPU_texture_from_blender(), GPUInput::ima, GPUPass::inputs, inputs, GPUInput::iuser, GPUInput::next, GPUPass::shader, GPUInput::shaderloc, GPUInput::tex, and GPUInput::texid.
Referenced by GPU_material_bind().
void GPU_pass_free | ( | GPUPass * | pass | ) |
Definition at line 1389 of file gpu_codegen.c.
References GPUPass::fragmentcode, GPU_inputs_free(), GPU_shader_free(), GPUPass::inputs, MEM_freeN(), GPUPass::shader, and GPUPass::vertexcode.
Referenced by GPU_material_free().
Definition at line 687 of file gpu_codegen.c.
References GPUPass::shader.
Referenced by GPU_material_bind_uniforms(), GPU_material_construct_end(), and gpu_material_set_attrib_id().
void GPU_pass_unbind | ( | GPUPass * | pass | ) |
Definition at line 786 of file gpu_codegen.c.
References GPUInput::bindtex, ListBase::first, GPU_shader_unbind(), GPU_texture_unbind(), GPUInput::ima, GPUPass::inputs, inputs, GPUInput::next, NULL, GPUPass::shader, and GPUInput::tex.
Referenced by GPU_material_unbind().
void GPU_pass_update_uniforms | ( | GPUPass * | pass | ) |
Definition at line 770 of file gpu_codegen.c.
References GPUInput::dynamicvec, ListBase::first, GPU_shader_uniform_vector(), GPUInput::ima, GPUPass::inputs, inputs, GPUInput::next, GPUPass::shader, GPUInput::shaderloc, GPUInput::tex, and GPUInput::type.
Referenced by GPU_material_bind_uniforms().