Cleanup: force wrapping all uses of PyDoc_STRVAR
Without this, minor edits can re-indent the whole doc-string at a different level, causing diffs to be unnecessary noisy.
This commit is contained in:
@@ -121,7 +121,9 @@ static PyObject *pygpu_batch__tp_new(PyTypeObject * /*type*/, PyObject *args, Py
|
||||
return (PyObject *)ret;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(pygpu_batch_vertbuf_add_doc, ".. method:: vertbuf_add(buf)\n"
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
pygpu_batch_vertbuf_add_doc, ".. method:: vertbuf_add(buf)\n"
|
||||
"\n"
|
||||
" Add another vertex buffer to the Batch.\n"
|
||||
" It is not possible to add more vertices to the batch using this method.\n"
|
||||
@@ -166,6 +168,7 @@ static PyObject *pygpu_batch_vertbuf_add(BPyGPUBatch *self, BPyGPUVertBuf *py_bu
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
pygpu_batch_program_set_doc,
|
||||
".. method:: program_set(program)\n"
|
||||
"\n"
|
||||
@@ -207,14 +210,16 @@ static PyObject *pygpu_batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_sha
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(pygpu_batch_draw_doc,
|
||||
".. method:: draw(program=None)\n"
|
||||
"\n"
|
||||
" Run the drawing program with the parameters assigned to the batch.\n"
|
||||
"\n"
|
||||
" :arg program: Program that performs the drawing operations.\n"
|
||||
" If ``None`` is passed, the last program set to this batch will run.\n"
|
||||
" :type program: :class:`gpu.types.GPUShader`\n");
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
pygpu_batch_draw_doc,
|
||||
".. method:: draw(program=None)\n"
|
||||
"\n"
|
||||
" Run the drawing program with the parameters assigned to the batch.\n"
|
||||
"\n"
|
||||
" :arg program: Program that performs the drawing operations.\n"
|
||||
" If ``None`` is passed, the last program set to this batch will run.\n"
|
||||
" :type program: :class:`gpu.types.GPUShader`\n");
|
||||
static PyObject *pygpu_batch_draw(BPyGPUBatch *self, PyObject *args)
|
||||
{
|
||||
BPyGPUShader *py_program = nullptr;
|
||||
@@ -236,6 +241,7 @@ static PyObject *pygpu_batch_draw(BPyGPUBatch *self, PyObject *args)
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
pygpu_batch_draw_instanced_doc,
|
||||
".. method:: draw_instanced(program, *, instance_start=0, instance_count=0)\n"
|
||||
"\n"
|
||||
@@ -279,21 +285,23 @@ static PyObject *pygpu_batch_draw_instanced(BPyGPUBatch *self, PyObject *args, P
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(pygpu_batch_draw_range_doc,
|
||||
".. method:: draw_range(program, *, elem_start=0, elem_count=0)\n"
|
||||
"\n"
|
||||
" Run the drawing program with the parameters assigned to the batch. Only draw\n"
|
||||
" the `elem_count` elements of the index buffer starting at `elem_start` \n"
|
||||
"\n"
|
||||
" :arg program: Program that performs the drawing operations.\n"
|
||||
" :type program: :class:`gpu.types.GPUShader`\n"
|
||||
" :arg elem_start: First index to draw. When not provided or set to 0 drawing\n"
|
||||
" will start from the first element of the index buffer.\n"
|
||||
" :type elem_start: int\n"
|
||||
" :arg elem_count: Number of elements of the index buffer to draw. When not\n"
|
||||
" provided or set to 0 all elements from `elem_start` to the end of the\n"
|
||||
" index buffer will be drawn.\n"
|
||||
" :type elem_count: int\n");
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
pygpu_batch_draw_range_doc,
|
||||
".. method:: draw_range(program, *, elem_start=0, elem_count=0)\n"
|
||||
"\n"
|
||||
" Run the drawing program with the parameters assigned to the batch. Only draw\n"
|
||||
" the `elem_count` elements of the index buffer starting at `elem_start` \n"
|
||||
"\n"
|
||||
" :arg program: Program that performs the drawing operations.\n"
|
||||
" :type program: :class:`gpu.types.GPUShader`\n"
|
||||
" :arg elem_start: First index to draw. When not provided or set to 0 drawing\n"
|
||||
" will start from the first element of the index buffer.\n"
|
||||
" :type elem_start: int\n"
|
||||
" :arg elem_count: Number of elements of the index buffer to draw. When not\n"
|
||||
" provided or set to 0 all elements from `elem_start` to the end of the\n"
|
||||
" index buffer will be drawn.\n"
|
||||
" :type elem_count: int\n");
|
||||
static PyObject *pygpu_batch_draw_range(BPyGPUBatch *self, PyObject *args, PyObject *kw)
|
||||
{
|
||||
BPyGPUShader *py_program = nullptr;
|
||||
@@ -403,6 +411,7 @@ static void pygpu_batch__tp_dealloc(BPyGPUBatch *self)
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(
|
||||
/* Wrap. */
|
||||
pygpu_batch__tp_doc,
|
||||
".. class:: GPUBatch(type, buf, elem=None)\n"
|
||||
"\n"
|
||||
|
||||
Reference in New Issue
Block a user