Blender V2.61 - r43446
|
Go to the source code of this file.
Definition in file GPU_extensions.h.
#define GPU_MAX_ATTRIB 32 |
Definition at line 174 of file GPU_extensions.h.
Referenced by cdDM_drawMappedFacesGLSL(), and gpu_nodes_get_vertex_attributes().
typedef enum GPUDeviceType GPUDeviceType |
typedef enum GPUDriverType GPUDriverType |
typedef struct GPUFrameBuffer GPUFrameBuffer |
Definition at line 46 of file GPU_extensions.h.
typedef struct GPUOffScreen GPUOffScreen |
Definition at line 49 of file GPU_extensions.h.
Definition at line 52 of file GPU_extensions.h.
typedef struct GPUTexture GPUTexture |
Definition at line 43 of file GPU_extensions.h.
typedef struct GPUVertexAttribs GPUVertexAttribs |
enum GPUDeviceType |
GPU_DEVICE_NVIDIA | |
GPU_DEVICE_ATI | |
GPU_DEVICE_INTEL | |
GPU_DEVICE_SOFTWARE | |
GPU_DEVICE_UNKNOWN | |
GPU_DEVICE_ANY |
Definition at line 69 of file GPU_extensions.h.
enum GPUDriverType |
Definition at line 85 of file GPU_extensions.h.
enum GPUOSType |
Definition at line 78 of file GPU_extensions.h.
int GPU_bicubic_bump_support | ( | void | ) |
Definition at line 654 of file gpu_codegen.c.
Referenced by do_material_tex(), and GPU_code_generate_glsl_lib().
void GPU_code_generate_glsl_lib | ( | void | ) |
Definition at line 659 of file gpu_codegen.c.
References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), datatoc_gpu_shader_material_glsl, glsl_material_library, and GPU_bicubic_bump_support().
Referenced by GPU_codegen_init().
int GPU_color_depth | ( | void | ) |
Definition at line 216 of file gpu_extensions.c.
References GPUGlobal::colordepth, and GG.
Referenced by index_to_framebuffer(), wm_automatic_draw_method(), and WM_framebuffer_to_index().
void GPU_extensions_disable | ( | void | ) |
Definition at line 91 of file gpu_extensions.c.
References GPUGlobal::extdisabled, and GG.
Referenced by no_glsl().
void GPU_extensions_exit | ( | void | ) |
Definition at line 192 of file gpu_extensions.c.
References GPU_codegen_exit(), and gpu_extensions_init.
Referenced by GPG_Application::exitEngine(), and WM_exit_ext().
void GPU_extensions_init | ( | void | ) |
Definition at line 96 of file gpu_extensions.c.
References GPUGlobal::colordepth, GPUGlobal::device, GPUGlobal::driver, g, GG, GPUGlobal::glslsupport, GPU_codegen_init(), GPU_DEVICE_ANY, GPU_DEVICE_ATI, GPU_DEVICE_INTEL, GPU_DEVICE_NVIDIA, GPU_DEVICE_SOFTWARE, GPU_DRIVER_ANY, GPU_DRIVER_OFFICIAL, GPU_DRIVER_OPENSOURCE, GPU_DRIVER_SOFTWARE, gpu_extensions_init, GPU_OS_MAC, GPU_OS_UNIX, GPU_OS_WIN, GPUGlobal::maxtextures, GPUGlobal::npotdisabled, and GPUGlobal::os.
Referenced by GPG_Application::initEngine(), WM_init(), and wm_window_add_ghostwindow().
GPUFrameBuffer* GPU_framebuffer_create | ( | void | ) |
Definition at line 694 of file gpu_extensions.c.
References fb(), GPU_framebuffer_free(), MEM_callocN(), NULL, and GPUFrameBuffer::object.
Referenced by GPU_lamp_from_blender(), and GPU_offscreen_create().
void GPU_framebuffer_free | ( | GPUFrameBuffer * | fb | ) |
Definition at line 820 of file gpu_extensions.c.
References GPUFrameBuffer::colortex, GPUGlobal::currentfb, GPUFrameBuffer::depthtex, GG, GPU_framebuffer_texture_detach(), MEM_freeN(), and GPUFrameBuffer::object.
Referenced by GPU_framebuffer_create(), gpu_lamp_shadow_free(), and GPU_offscreen_free().
void GPU_framebuffer_restore | ( | void | ) |
Definition at line 839 of file gpu_extensions.c.
References GPUGlobal::currentfb, and GG.
Referenced by GPU_framebuffer_texture_attach(), GPU_lamp_from_blender(), GPU_lamp_shadow_buffer_unbind(), GPU_offscreen_create(), and GPU_offscreen_unbind().
int GPU_framebuffer_texture_attach | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex, | ||
char | err_out[256] | ||
) |
Definition at line 714 of file gpu_extensions.c.
References GPUTexture::bindcode, GPUFrameBuffer::colortex, GPUGlobal::currentfb, GPUTexture::depth, GPUFrameBuffer::depthtex, fb(), GPUTexture::fb, GG, GPU_framebuffer_restore(), GPU_print_framebuffer_error(), GPUFrameBuffer::object, and GPUTexture::target.
Referenced by GPU_lamp_from_blender(), and GPU_offscreen_create().
void GPU_framebuffer_texture_bind | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex, | ||
int | w, | ||
int | h | ||
) |
Referenced by GPU_lamp_shadow_buffer_bind(), and GPU_offscreen_bind().
void GPU_framebuffer_texture_detach | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex | ||
) |
Definition at line 757 of file gpu_extensions.c.
References GPUFrameBuffer::colortex, GPUGlobal::currentfb, GPUTexture::depth, GPUFrameBuffer::depthtex, GPUTexture::fb, GG, NULL, GPUFrameBuffer::object, and GPUTexture::target.
Referenced by GPU_framebuffer_free(), and GPU_texture_free().
void GPU_framebuffer_texture_unbind | ( | GPUFrameBuffer * | fb, |
GPUTexture * | tex | ||
) |
Referenced by GPU_lamp_shadow_buffer_unbind(), and GPU_offscreen_unbind().
int GPU_glsl_support | ( | void | ) |
Definition at line 198 of file gpu_extensions.c.
References GPUGlobal::extdisabled, GG, and GPUGlobal::glslsupport.
Referenced by draw_glsl_material(), draw_mesh_textured(), GPU_shader_export(), GPG_Application::initEngine(), and StartKetsjiShell().
int GPU_non_power_of_two_support | ( | void | ) |
Definition at line 203 of file gpu_extensions.c.
References GG, GPU_DEVICE_ATI, GPU_DRIVER_OFFICIAL, GPU_OS_MAC, GPU_type_matches(), and GPUGlobal::npotdisabled.
Referenced by draw_volume(), GPU_texture_create_3D(), GPU_texture_create_nD(), init_internal_icons(), and wm_triple_gen_textures().
void GPU_offscreen_bind | ( | GPUOffScreen * | ofs | ) |
Definition at line 912 of file gpu_extensions.c.
References GPUOffScreen::color, GPUOffScreen::fb, GPU_framebuffer_texture_bind(), GPUOffScreen::h, and GPUOffScreen::w.
Referenced by ED_view3d_draw_offscreen_imbuf(), and screen_opengl_render_apply().
GPUOffScreen* GPU_offscreen_create | ( | int | width, |
int | height, | ||
char | err_out[256] | ||
) |
Definition at line 859 of file gpu_extensions.c.
References GPUOffScreen::color, GPUOffScreen::depth, GPUOffScreen::fb, GPU_framebuffer_create(), GPU_framebuffer_restore(), GPU_framebuffer_texture_attach(), GPU_offscreen_free(), GPU_texture_create_2D(), GPU_texture_create_depth(), GPUOffScreen::h, MEM_callocN(), NULL, and GPUOffScreen::w.
Referenced by ED_view3d_draw_offscreen_imbuf(), and screen_opengl_render_init().
void GPU_offscreen_free | ( | GPUOffScreen * | ofs | ) |
Definition at line 900 of file gpu_extensions.c.
References GPUOffScreen::color, GPUOffScreen::depth, GPUOffScreen::fb, GPU_framebuffer_free(), GPU_texture_free(), and MEM_freeN().
Referenced by ED_view3d_draw_offscreen_imbuf(), GPU_offscreen_create(), and screen_opengl_render_end().
void GPU_offscreen_read_pixels | ( | GPUOffScreen * | ofs, |
int | type, | ||
void * | pixels | ||
) |
Definition at line 925 of file gpu_extensions.c.
References GPUOffScreen::h, and GPUOffScreen::w.
Referenced by ED_view3d_draw_offscreen_imbuf(), and screen_opengl_render_apply().
void GPU_offscreen_unbind | ( | GPUOffScreen * | ofs | ) |
Definition at line 918 of file gpu_extensions.c.
References GPUOffScreen::color, GPUOffScreen::fb, GPU_framebuffer_restore(), and GPU_framebuffer_texture_unbind().
Referenced by ED_view3d_draw_offscreen_imbuf(), and screen_opengl_render_apply().
int GPU_print_error | ( | const char * | str | ) |
Definition at line 221 of file gpu_extensions.c.
Referenced by drawfloor(), GPU_shader_bind(), GPU_shader_get_attribute(), GPU_shader_unbind(), GPU_shader_uniform_texture(), GPU_shader_uniform_vector(), GPU_texture_bind(), GPU_texture_create_3D(), GPU_texture_from_blender(), and GPU_texture_unbind().
void GPU_shader_bind | ( | GPUShader * | shader | ) |
Definition at line 1082 of file gpu_extensions.c.
References GPU_print_error(), and GPUShader::object.
Referenced by GPU_nodes_extract_dynamic_inputs(), and GPU_pass_bind().
GPUShader* GPU_shader_create | ( | const char * | vertexcode, |
const char * | fragcode, | ||
const char * | libcode | ||
) |
Definition at line 962 of file gpu_extensions.c.
References GPUShader::fragment, GPU_shader_free(), length(), log(), MEM_callocN(), NULL, GPUShader::object, shader_print_errors(), and GPUShader::vertex.
Referenced by GPU_generate_pass().
void GPU_shader_free | ( | GPUShader * | shader | ) |
Definition at line 1096 of file gpu_extensions.c.
References GPUShader::fragment, GPUShader::lib, MEM_freeN(), GPUShader::object, and GPUShader::vertex.
Referenced by GPU_pass_free(), and GPU_shader_create().
int GPU_shader_get_attribute | ( | GPUShader * | shader, |
const char * | name | ||
) |
Definition at line 1159 of file gpu_extensions.c.
References GPU_print_error(), and GPUShader::object.
Referenced by gpu_material_set_attrib_id().
int GPU_shader_get_uniform | ( | GPUShader * | shader, |
const char * | name | ||
) |
Definition at line 1109 of file gpu_extensions.c.
References GPUShader::object.
Referenced by GPU_material_construct_end(), and GPU_nodes_extract_dynamic_inputs().
void GPU_shader_unbind | ( | GPUShader * | shader | ) |
Referenced by GPU_nodes_extract_dynamic_inputs(), and GPU_pass_unbind().
void GPU_shader_uniform_texture | ( | GPUShader * | shader, |
int | location, | ||
GPUTexture * | tex | ||
) |
Referenced by GPU_pass_bind().
void GPU_shader_uniform_vector | ( | GPUShader * | shader, |
int | location, | ||
int | length, | ||
int | arraysize, | ||
float * | value | ||
) |
Referenced by GPU_material_bind_uniforms(), and GPU_pass_update_uniforms().
void GPU_texture_bind | ( | GPUTexture * | tex, |
int | number | ||
) |
Definition at line 589 of file gpu_extensions.c.
References GPUTexture::bindcode, GG, GPU_print_error(), GPUGlobal::maxtextures, GPUTexture::number, and GPUTexture::target.
Referenced by draw_volume(), and GPU_pass_bind().
GPUTexture* GPU_texture_create_1D | ( | int | w, |
float * | pixels, | ||
char | err_out[256] | ||
) |
Definition at line 559 of file gpu_extensions.c.
References GPU_texture_create_nD(), and GPU_texture_unbind().
GPUTexture* GPU_texture_create_2D | ( | int | w, |
int | h, | ||
float * | pixels, | ||
char | err_out[256] | ||
) |
Definition at line 569 of file gpu_extensions.c.
References GPU_texture_create_nD(), and GPU_texture_unbind().
Referenced by gpu_node_input_link(), and GPU_offscreen_create().
GPUTexture* GPU_texture_create_3D | ( | int | w, |
int | h, | ||
int | depth, | ||
float * | fpixels | ||
) |
Definition at line 431 of file gpu_extensions.c.
References GPUTexture::bindcode, GPUTexture::depth, GL_CLAMP_TO_EDGE, GPU_non_power_of_two_support(), GPU_print_error(), GPU_texture_free(), GPU_texture_unbind(), GPUTexture::h, MEM_callocN(), MEM_freeN(), NULL, GPUTexture::number, power_of_2_max_i(), GPUTexture::refcount, GPUTexture::target, GPUTexture::w, and simple_enum_gen::w.
Referenced by GPU_create_smoke().
GPUTexture* GPU_texture_create_depth | ( | int | w, |
int | h, | ||
char | err_out[256] | ||
) |
Definition at line 579 of file gpu_extensions.c.
References GPU_texture_create_nD(), GPU_texture_unbind(), and NULL.
Referenced by GPU_lamp_from_blender(), and GPU_offscreen_create().
GPUFrameBuffer* GPU_texture_framebuffer | ( | GPUTexture * | tex | ) |
Definition at line 681 of file gpu_extensions.c.
References GPUTexture::fb.
void GPU_texture_free | ( | GPUTexture * | tex | ) |
Definition at line 639 of file gpu_extensions.c.
References GPUTexture::bindcode, GPUTexture::fb, GPUTexture::fromblender, GPU_framebuffer_texture_detach(), MEM_freeN(), and GPUTexture::refcount.
Referenced by GPU_free_image(), GPU_free_smoke(), GPU_inputs_free(), gpu_lamp_shadow_free(), GPU_offscreen_free(), GPU_texture_create_3D(), and GPU_texture_create_nD().
GPUTexture* GPU_texture_from_blender | ( | struct Image * | ima, |
struct ImageUser * | iuser, | ||
double | time, | ||
int | mipmap | ||
) |
Definition at line 511 of file gpu_extensions.c.
References GPUTexture::bindcode, GPUTexture::fromblender, GPU_print_error(), GPU_update_image_time(), GPU_verify_image(), Image::gputexture, GPUTexture::h, MEM_callocN(), NULL, GPUTexture::number, GPUTexture::refcount, GPUTexture::target, GPUTexture::w, and simple_enum_gen::w.
Referenced by GPU_pass_bind().
int GPU_texture_opengl_bindcode | ( | GPUTexture * | tex | ) |
Definition at line 676 of file gpu_extensions.c.
References GPUTexture::bindcode.
Referenced by GPU_shader_export().
int GPU_texture_opengl_height | ( | GPUTexture * | tex | ) |
Definition at line 671 of file gpu_extensions.c.
References GPUTexture::h.
Referenced by GPU_lamp_shadow_buffer_bind(), and GPU_shader_export().
int GPU_texture_opengl_width | ( | GPUTexture * | tex | ) |
Definition at line 666 of file gpu_extensions.c.
References GPUTexture::w.
Referenced by GPU_lamp_shadow_buffer_bind(), and GPU_shader_export().
void GPU_texture_ref | ( | GPUTexture * | tex | ) |
Definition at line 656 of file gpu_extensions.c.
References GPUTexture::refcount.
int GPU_texture_target | ( | GPUTexture * | tex | ) |
Definition at line 661 of file gpu_extensions.c.
References GPUTexture::target.
void GPU_texture_unbind | ( | GPUTexture * | tex | ) |
Definition at line 614 of file gpu_extensions.c.
References GG, GPU_print_error(), GPUGlobal::maxtextures, GPUTexture::number, and GPUTexture::target.
Referenced by draw_volume(), GPU_pass_unbind(), GPU_texture_create_1D(), GPU_texture_create_2D(), GPU_texture_create_3D(), and GPU_texture_create_depth().
int GPU_type_matches | ( | GPUDeviceType | device, |
GPUOSType | os, | ||
GPUDriverType | driver | ||
) |
Definition at line 82 of file gpu_extensions.c.
References GPUGlobal::device, GPUGlobal::driver, GG, and GPUGlobal::os.
Referenced by GPU_non_power_of_two_support(), wm_automatic_draw_method(), and wm_window_add_ghostwindow().