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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-02-17 19:22:54 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-17 19:23:35 +0300
commita7750f95b9f1073d35664c95fda031d0be679bdc (patch)
tree42d2b88ef6552d67bb59b7945273b146bb155fb5 /source/blender/python/gpu/gpu_py_shader.c
parent0da10b279a312ecc32391bb5f3abe78ad2fd44c7 (diff)
GPU Python: Rename 'uniform_buffer' to 'uniform_block'
From the the opengl wiki: > Buffer objects are associated with a program's uniform block similarly to the way that texture objects are associated with sampler uniforms.
Diffstat (limited to 'source/blender/python/gpu/gpu_py_shader.c')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index 538bed7df6d..2f9b67bdb6a 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -494,8 +494,8 @@ static PyObject *pygpu_shader_uniform_sampler(BPyGPUShader *self, PyObject *args
}
PyDoc_STRVAR(
- pygpu_shader_uniform_buffer_doc,
- ".. method:: uniform_buffer(name, ubo)\n"
+ pygpu_shader_uniform_block_doc,
+ ".. method:: uniform_block(name, ubo)\n"
"\n"
" Specify the value of an uniform buffer object variable for the current GPUShader.\n"
"\n"
@@ -503,12 +503,12 @@ PyDoc_STRVAR(
" :type name: str\n"
" :param ubo: Uniform Buffer to attach.\n"
" :type texture: :class:`gpu.types.GPUUniformBuf`\n");
-static PyObject *pygpu_shader_uniform_buffer(BPyGPUShader *self, PyObject *args)
+static PyObject *pygpu_shader_uniform_block(BPyGPUShader *self, PyObject *args)
{
const char *name;
BPyGPUUniformBuf *py_ubo;
if (!PyArg_ParseTuple(
- args, "sO!:GPUShader.uniform_buffer", &name, &BPyGPUUniformBuf_Type, &py_ubo)) {
+ args, "sO!:GPUShader.uniform_block", &name, &BPyGPUUniformBuf_Type, &py_ubo)) {
return NULL;
}
@@ -601,10 +601,10 @@ static struct PyMethodDef pygpu_shader__tp_methods[] = {
(PyCFunction)pygpu_shader_uniform_sampler,
METH_VARARGS,
pygpu_shader_uniform_sampler_doc},
- {"uniform_buffer",
- (PyCFunction)pygpu_shader_uniform_buffer,
+ {"uniform_block",
+ (PyCFunction)pygpu_shader_uniform_block,
METH_VARARGS,
- pygpu_shader_uniform_buffer_doc},
+ pygpu_shader_uniform_block_doc},
{"attr_from_name",
(PyCFunction)pygpu_shader_attr_from_name,
METH_O,