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.
This commit is contained in:
@@ -494,8 +494,8 @@ static PyObject *pygpu_shader_uniform_sampler(BPyGPUShader *self, PyObject *args
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(
|
PyDoc_STRVAR(
|
||||||
pygpu_shader_uniform_buffer_doc,
|
pygpu_shader_uniform_block_doc,
|
||||||
".. method:: uniform_buffer(name, ubo)\n"
|
".. method:: uniform_block(name, ubo)\n"
|
||||||
"\n"
|
"\n"
|
||||||
" Specify the value of an uniform buffer object variable for the current GPUShader.\n"
|
" Specify the value of an uniform buffer object variable for the current GPUShader.\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -503,12 +503,12 @@ PyDoc_STRVAR(
|
|||||||
" :type name: str\n"
|
" :type name: str\n"
|
||||||
" :param ubo: Uniform Buffer to attach.\n"
|
" :param ubo: Uniform Buffer to attach.\n"
|
||||||
" :type texture: :class:`gpu.types.GPUUniformBuf`\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;
|
const char *name;
|
||||||
BPyGPUUniformBuf *py_ubo;
|
BPyGPUUniformBuf *py_ubo;
|
||||||
if (!PyArg_ParseTuple(
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -601,10 +601,10 @@ static struct PyMethodDef pygpu_shader__tp_methods[] = {
|
|||||||
(PyCFunction)pygpu_shader_uniform_sampler,
|
(PyCFunction)pygpu_shader_uniform_sampler,
|
||||||
METH_VARARGS,
|
METH_VARARGS,
|
||||||
pygpu_shader_uniform_sampler_doc},
|
pygpu_shader_uniform_sampler_doc},
|
||||||
{"uniform_buffer",
|
{"uniform_block",
|
||||||
(PyCFunction)pygpu_shader_uniform_buffer,
|
(PyCFunction)pygpu_shader_uniform_block,
|
||||||
METH_VARARGS,
|
METH_VARARGS,
|
||||||
pygpu_shader_uniform_buffer_doc},
|
pygpu_shader_uniform_block_doc},
|
||||||
{"attr_from_name",
|
{"attr_from_name",
|
||||||
(PyCFunction)pygpu_shader_attr_from_name,
|
(PyCFunction)pygpu_shader_attr_from_name,
|
||||||
METH_O,
|
METH_O,
|
||||||
|
|||||||
Reference in New Issue
Block a user