Blender Git Loki

Git Commits -> Revision 01744ab

Revision 01744ab by Benoit Bolsee (master)
September 9, 2011, 11:55 (GMT)
GPU: add gpu python module with export_shader() function to export GLSL shader.

shader = gpu.export_shader(scene,material)

Returns the GLSL shader that blender generates to produce the visual effect
of material in scene for the purpose of reusing the shader in an external engine.
This function is meant to be used in a material exporter so that the GLSL
shader can be exported entirely. The return value is a dictionary containing the
shader source code and all associated data.

The full documentation is under sphinx.

Warning: there has been an API between the patch and this commit:
uniform['lamp'] and uniform['image'] now return python reference to
ID block instead of ID name as before. The X3D exporter that uses this
function must be adapted.

Commit Details:

Full Hash: 01744abd8187d1566b336bf38033673aa05b6786
SVN Revision: 40061
Parent Commit: 2b33c6b
Lines Changed: +2571, -1372

3 Added Paths:

/doc/python_api/rst/gpu.rst (+531, -0) (View)
/source/blender/python/intern/gpu.c (+291, -0) (View)
/source/blender/python/intern/gpu.h (+41, -0) (View)

11 Modified Paths:

/source/blender/gpu/GPU_extensions.h (+2, -0) (Diff)
/source/blender/gpu/GPU_material.h (+71, -3) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+25, -114) (Diff)
/source/blender/gpu/intern/gpu_codegen.h (+102, -1) (Diff)
/source/blender/gpu/intern/gpu_extensions.c (+6, -1) (Diff)
/source/blender/gpu/intern/gpu_material.c (+197, -13) (Diff)
/source/blender/gpu/intern/gpu_shader_material.glsl (+12, -12) (Diff)
/source/blender/gpu/intern/gpu_shader_material.glsl.c (+1287, -1227) (Diff)
/source/blender/python/intern/bpy_interface.c (+2, -0) (Diff)
/source/blender/python/intern/CMakeLists.txt (+3, -0) (Diff)
/source/blender/python/SConscript (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021