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:
authorJoseph Eagar <joeedh@gmail.com>2020-10-24 00:49:14 +0300
committerJoseph Eagar <joeedh@gmail.com>2020-10-24 00:49:14 +0300
commit4faa2b4bc9f56cc2ab7260e5d464fcee27a7adbb (patch)
tree8c95075d30d3ed21e86adf07060c5779b92f2c2b /source/blender/python
parent0a66436fe5f26f8d7b6fb49396f21313fded8654 (diff)
Rebase branch
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/gpu/gpu_py_offscreen.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index d6548834f2d..f6d9d0aea08 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -85,22 +85,17 @@ static PyObject *bpygpu_offscreen_new(PyTypeObject *UNUSED(self), PyObject *args
{
BPYGPU_IS_INIT_OR_ERROR_OBJ;
- GPUOffScreen *ofs = NULL;
- int width, height;
+ GPUOffScreen *ofs;
+ int width, height, high_bitdepth=0, samples = 0;
char err_out[256];
- 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)) {
+ static const char *_keywords[] = {"width", "height", "samples", "high_bitdepth", NULL};
+ static _PyArg_Parser _parser = {"ii|ii:GPUOffScreen.__new__", _keywords, 0};
+ if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &width, &height, &samples, &high_bitdepth)) {
return NULL;
}
- if (GPU_context_active_get()) {
- ofs = GPU_offscreen_create(width, height, true, false, err_out);
- }
- else {
- strncpy(err_out, "No active GPU context found", 256);
- }
+ ofs = GPU_offscreen_create(width, height, true, high_bitdepth, err_out);
if (ofs == NULL) {
PyErr_Format(PyExc_RuntimeError,