diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-13 20:18:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-13 22:02:31 +0300 |
commit | 6e040b045ab1d94a877ab6f72f431c9b64e1121c (patch) | |
tree | 0c2ac27d592da617eccb911d32d65c565c7186ca /source/blender/python/intern/gpu_offscreen.c | |
parent | e9b1163162d78324c118d3649451e81644b1af03 (diff) |
GPU: add offscreen buffer drawing utility functions.
Diffstat (limited to 'source/blender/python/intern/gpu_offscreen.c')
-rw-r--r-- | source/blender/python/intern/gpu_offscreen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/python/intern/gpu_offscreen.c b/source/blender/python/intern/gpu_offscreen.c index 91d407d18a8..2da0227cdca 100644 --- a/source/blender/python/intern/gpu_offscreen.c +++ b/source/blender/python/intern/gpu_offscreen.c @@ -39,6 +39,7 @@ #include "GPU_compositing.h" #include "GPU_framebuffer.h" +#include "GPU_texture.h" #include "../mathutils/mathutils.h" @@ -89,7 +90,8 @@ PyDoc_STRVAR(pygpu_offscreen_color_texture_doc, "Color texture.\n\n:type: int"); static PyObject *pygpu_offscreen_color_texture_get(BPy_GPUOffScreen *self, void *UNUSED(type)) { BPY_GPU_OFFSCREEN_CHECK_OBJ(self); - return PyLong_FromLong(GPU_offscreen_color_texture(self->ofs)); + GPUTexture *texture = GPU_offscreen_color_texture(self->ofs); + return PyLong_FromLong(GPU_texture_opengl_bindcode(texture)); } PyDoc_STRVAR(pygpu_offscreen_bind_doc, @@ -354,7 +356,7 @@ static PyObject *pygpu_offscreen_new(PyObject *UNUSED(self), PyObject *args, PyO return NULL; } - ofs = GPU_offscreen_create(width, height, samples, false, err_out); + ofs = GPU_offscreen_create(width, height, samples, true, false, err_out); if (ofs == NULL) { PyErr_Format(PyExc_RuntimeError, |