diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2011-09-09 15:55:38 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2011-09-09 15:55:38 +0400 |
commit | 01744abd8187d1566b336bf38033673aa05b6786 (patch) | |
tree | 848742d2ce1be126a4b6381aecf03b6c2e9d93b4 /source/blender/gpu/GPU_extensions.h | |
parent | 2b33c6b0b27c0a4fee5a1a405e012eb4032bba05 (diff) |
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.
Diffstat (limited to 'source/blender/gpu/GPU_extensions.h')
-rw-r--r-- | source/blender/gpu/GPU_extensions.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index d0c7f9d494f..5a1c0c537c0 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -126,6 +126,7 @@ GPUFrameBuffer *GPU_texture_framebuffer(GPUTexture *tex); int GPU_texture_target(GPUTexture *tex); int GPU_texture_opengl_width(GPUTexture *tex); int GPU_texture_opengl_height(GPUTexture *tex); +int GPU_texture_opengl_bindcode(GPUTexture *tex); /* GPU Framebuffer - this is a wrapper for an OpenGL framebuffer object (FBO). in practice @@ -179,6 +180,7 @@ typedef struct GPUVertexAttribs { int type; int glindex; int gltexco; + int attribid; char name[32]; } layer[GPU_MAX_ATTRIB]; |