Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/python_api/examples/gpu.shader.py36
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c29
2 files changed, 28 insertions, 37 deletions
diff --git a/doc/python_api/examples/gpu.shader.py b/doc/python_api/examples/gpu.shader.py
deleted file mode 100644
index 3c72e70378c..00000000000
--- a/doc/python_api/examples/gpu.shader.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Built-in shaders
-++++++++++++++++
-
-All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.
-The value of it can only be modified using the :class:`gpu.matrix` module.
-
-2D_UNIFORM_COLOR:
- attributes: vec3 pos
- uniforms: vec4 color
-
-2D_FLAT_COLOR:
- attributes: vec3 pos, vec4 color
- uniforms: -
-
-2D_SMOOTH_COLOR:
- attributes: vec3 pos, vec4 color
- uniforms: -
-
-2D_IMAGE:
- attributes: vec3 pos, vec2 texCoord
- uniforms: sampler2D image
-
-3D_UNIFORM_COLOR:
- attributes: vec3 pos
- uniforms: vec4 color
-
-3D_FLAT_COLOR:
- attributes: vec3 pos, vec4 color
- uniforms: -
-
-3D_SMOOTH_COLOR:
- attributes: vec3 pos, vec4 color
- uniforms: -
-
-"""
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index 7734c80abc4..3748691c434 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -748,7 +748,34 @@ static struct PyMethodDef bpygpu_shader_module_methods[] = {
};
PyDoc_STRVAR(bpygpu_shader_module_doc,
- "This module provides access to GPUShader internal functions.");
+ "This module provides access to GPUShader internal functions.\n"
+ "\n"
+ ".. rubric:: Built-in shaders\n"
+ "\n"
+ "All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.\n"
+ "The value of it can only be modified using the :class:`gpu.matrix` module.\n"
+ "\n"
+ "2D_UNIFORM_COLOR\n"
+ " :Attributes: vec3 pos\n"
+ " :Uniforms: vec4 color\n"
+ "2D_FLAT_COLOR\n"
+ " :Attributes: vec3 pos, vec4 color\n"
+ " :Uniforms: none\n"
+ "2D_SMOOTH_COLOR\n"
+ " :Attributes: vec3 pos, vec4 color\n"
+ " :Uniforms: none\n"
+ "2D_IMAGE\n"
+ " :Attributes: vec3 pos, vec2 texCoord\n"
+ " :Uniforms: sampler2D image\n"
+ "3D_UNIFORM_COLOR\n"
+ " :Attributes: vec3 pos\n"
+ " :Uniforms: vec4 color\n"
+ "3D_FLAT_COLOR\n"
+ " :Attributes: vec3 pos, vec4 color\n"
+ " :Uniforms: none\n"
+ "3D_SMOOTH_COLOR\n"
+ " :Attributes: vec3 pos, vec4 color\n"
+ " :Uniforms: none\n");
static PyModuleDef BPyGPU_shader_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.shader",