diff options
Diffstat (limited to 'source/blender/python/gpu/gpu_py_offscreen.c')
-rw-r--r-- | source/blender/python/gpu/gpu_py_offscreen.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 9d5671ff702..9e9a0b9066a 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -96,20 +96,20 @@ static int pygpu_offscreen_valid_check(BPyGPUOffScreen *py_ofs) typedef struct { PyObject_HEAD /* required python macro */ - BPyGPUOffScreen *py_offs; + BPyGPUOffScreen *py_offscreen; int level; bool is_explicitly_bound; /* Bound by "bind" method. */ } OffScreenStackContext; static void pygpu_offscreen_stack_context__tp_dealloc(OffScreenStackContext *self) { - Py_DECREF(self->py_offs); + Py_DECREF(self->py_offscreen); PyObject_DEL(self); } static PyObject *pygpu_offscreen_stack_context_enter(OffScreenStackContext *self) { - BPY_GPU_OFFSCREEN_CHECK_OBJ(self->py_offs); + BPY_GPU_OFFSCREEN_CHECK_OBJ(self->py_offscreen); if (!self->is_explicitly_bound) { if (self->level != -1) { @@ -117,7 +117,7 @@ static PyObject *pygpu_offscreen_stack_context_enter(OffScreenStackContext *self return NULL; } - GPU_offscreen_bind(self->py_offs->ofs, true); + GPU_offscreen_bind(self->py_offscreen->ofs, true); self->level = GPU_framebuffer_stack_level_get(); } @@ -127,7 +127,7 @@ static PyObject *pygpu_offscreen_stack_context_enter(OffScreenStackContext *self static PyObject *pygpu_offscreen_stack_context_exit(OffScreenStackContext *self, PyObject *UNUSED(args)) { - BPY_GPU_OFFSCREEN_CHECK_OBJ(self->py_offs); + BPY_GPU_OFFSCREEN_CHECK_OBJ(self->py_offscreen); if (self->level == -1) { PyErr_SetString(PyExc_RuntimeError, "Not yet in use\n"); @@ -140,7 +140,7 @@ static PyObject *pygpu_offscreen_stack_context_exit(OffScreenStackContext *self, PyExc_RuntimeError, "Level of bind mismatch, expected %d, got %d\n", self->level, level); } - GPU_offscreen_unbind(self->py_offs->ofs, true); + GPU_offscreen_unbind(self->py_offscreen->ofs, true); Py_RETURN_NONE; } @@ -166,7 +166,7 @@ static PyObject *pygpu_offscreen_bind(BPyGPUOffScreen *self) { OffScreenStackContext *ret = PyObject_New(OffScreenStackContext, &PyGPUOffscreenStackContext_Type); - ret->py_offs = self; + ret->py_offscreen = self; ret->level = -1; ret->is_explicitly_bound = false; Py_INCREF(self); @@ -184,7 +184,7 @@ PyDoc_STRVAR(pygpu_offscreen_unbind_doc, "\n" " :arg restore: Restore the OpenGL state, can only be used when the state has been " "saved before.\n" - " :type restore: `bool`\n"); + " :type restore: bool\n"); static PyObject *pygpu_offscreen_unbind(BPyGPUOffScreen *self, PyObject *args, PyObject *kwds) { bool restore = true; @@ -336,8 +336,8 @@ static PyObject *pygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *ar region, GPU_offscreen_width(self->ofs), GPU_offscreen_height(self->ofs), - (float(*)[4])py_mat_view->matrix, - (float(*)[4])py_mat_projection->matrix, + (const float(*)[4])py_mat_view->matrix, + (const float(*)[4])py_mat_projection->matrix, true, true, "", @@ -412,9 +412,9 @@ PyDoc_STRVAR(pygpu_offscreen__tp_doc, " This object gives access to off screen buffers.\n" "\n" " :arg width: Horizontal dimension of the buffer.\n" - " :type width: `int`\n" + " :type width: int\n" " :arg height: Vertical dimension of the buffer.\n" - " :type height: `int`\n"); + " :type height: int\n"); PyTypeObject BPyGPUOffScreen_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUOffScreen", .tp_basicsize = sizeof(BPyGPUOffScreen), |