diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-02 18:28:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-02 18:28:41 +0300 |
commit | 35481fde40c78e004230d7909e7b7d83438cc64e (patch) | |
tree | 639b68a64d33358749333f7dbdfd6829c7b06b9b /source/blender/python/gpu | |
parent | a4fe8ef236b65210ef04945be7f3936757015b7f (diff) |
GPUOffScreen: Remove the sample parameter
This is because the DRW module is no longer compatible with drawing using
MSAA.
This also change the Python API.
Diffstat (limited to 'source/blender/python/gpu')
-rw-r--r-- | source/blender/python/gpu/gpu_py_offscreen.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 311cf2b8c73..e56f87e6221 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -86,17 +86,17 @@ static PyObject *bpygpu_offscreen_new(PyTypeObject *UNUSED(self), PyObject *args BPYGPU_IS_INIT_OR_ERROR_OBJ; GPUOffScreen *ofs = NULL; - int width, height, samples = 0; + int width, height; char err_out[256]; - static const char *_keywords[] = {"width", "height", "samples", NULL}; + static const char *_keywords[] = {"width", "height", NULL}; static _PyArg_Parser _parser = {"ii|i:GPUOffScreen.__new__", _keywords, 0}; - if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &width, &height, &samples)) { + if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &width, &height)) { return NULL; } if (GPU_context_active_get()) { - ofs = GPU_offscreen_create(width, height, samples, true, false, err_out); + ofs = GPU_offscreen_create(width, height, true, false, err_out); } else { strncpy(err_out, "No active GPU context found", 256); @@ -345,16 +345,14 @@ static struct PyMethodDef bpygpu_offscreen_methods[] = { }; PyDoc_STRVAR(bpygpu_offscreen_doc, - ".. class:: GPUOffScreen(width, height, samples=0)\n" + ".. class:: GPUOffScreen(width, height)\n" "\n" " This object gives access to off screen buffers.\n" "\n" " :arg width: Horizontal dimension of the buffer.\n" " :type width: `int`\n" " :arg height: Vertical dimension of the buffer.\n" - " :type height: `int`\n" - " :arg samples: OpenGL samples to use for MSAA or zero to disable.\n" - " :type samples: `int`\n"); + " :type height: `int`\n"); PyTypeObject BPyGPUOffScreen_Type = { PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUOffScreen", .tp_basicsize = sizeof(BPyGPUOffScreen), |