[Bf-blender-cvs] [94673c6c643] temp-trimesh-sculpt: * Add support for 16-bit textures to python gpu api

Joseph Eagar noreply at git.blender.org
Wed Oct 14 04:05:39 CEST 2020


Commit: 94673c6c6437e08609132d3f5cad76058ba26020
Author: Joseph Eagar
Date:   Wed Jun 26 12:25:23 2019 -0700
Branches: temp-trimesh-sculpt
https://developer.blender.org/rB94673c6c6437e08609132d3f5cad76058ba26020

* Add support for 16-bit textures to python gpu
  api

===================================================================

M	source/blender/python/gpu/gpu_py_offscreen.c

===================================================================

diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index 0efafe4e022..c8f022b95b9 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -84,16 +84,16 @@ static PyObject *bpygpu_offscreen_new(PyTypeObject *UNUSED(self), PyObject *args
   BPYGPU_IS_INIT_OR_ERROR_OBJ;
 
   GPUOffScreen *ofs;
-  int width, height, samples = 0;
+  int width, height, high_bitdepth=0, samples = 0;
   char err_out[256];
 
-  static const char *_keywords[] = {"width", "height", "samples", NULL};
-  static _PyArg_Parser _parser = {"ii|i:GPUOffScreen.__new__", _keywords, 0};
-  if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &width, &height, &samples)) {
+  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;
   }
 
-  ofs = GPU_offscreen_create(width, height, samples, true, false, err_out);
+  ofs = GPU_offscreen_create(width, height, samples, true, high_bitdepth, err_out);
 
   if (ofs == NULL) {
     PyErr_Format(PyExc_RuntimeError,



More information about the Bf-blender-cvs mailing list