|
This patch adds the python module 'gpu' to blender with one method in it: export_shader(scene,material) to export the GLSL shader for use in an external game engine.
The intention is to use this API in the X3D exporter to allow using the GLSL shader unchanged in the H3D game engine. The function export everything that's needed to use the shader.
Documentation in http://www.pasteall.org/22048/text
The patch modifies the GLSL library code by converting all 1D textures to 2D textures for compatibility with X3D. To keep it small, the patch does not include the modified
source/blender/gpu/intern/gpu_shader_material.glsl.c
You must run
release/datafiles/datatoc.py source/blender/gpu/intern/gpu_shader_material.glsl
after applying the patch to update the C version of the GLSL library.
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+765 lines, -141 lines) |
Patch |
|
|
source/blender/gpu/CMakeLists.txt
|
View
|
1
2
|
2 chunks |
+11 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/GPU_extensions.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/GPU_material.h
|
View
|
1
2
|
4 chunks |
+71 lines, -2 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/GPU_python.h
|
View
|
|
1 chunk |
+54 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/SConscript
|
View
|
1
2
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/intern/gpu_codegen.h
|
View
|
1
2
|
2 chunks |
+114 lines, -1 line |
0 comments
|
Download
|
|
|
source/blender/gpu/intern/gpu_codegen.c
|
View
|
1
2
|
10 chunks |
+23 lines, -101 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/intern/gpu_extensions.c
|
View
|
1
2
|
2 chunks |
+1 line, -12 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/intern/gpu_material.c
|
View
|
1
2
|
11 chunks |
+186 lines, -13 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/intern/gpu_python.c
|
View
|
1
|
1 chunk |
+285 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/gpu/intern/gpu_shader_material.glsl
|
View
|
1
2
|
3 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
|
|
source/blender/python/intern/bpy_interface.c
|
View
|
1
2
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
Total messages: 3
|