diff options
author | Germano <germano.costa@ig.com.br> | 2017-10-15 17:43:46 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2017-10-15 17:43:46 +0300 |
commit | 3b601c6ec881b6309a286d7279b5df69a36fb97a (patch) | |
tree | afb3566e5d0667d16f697ca4dbb9d047f678b4b0 /modules | |
parent | eeabcc9c555be5ee1a526c0af654fa38cf76d429 (diff) |
Fix T53074: Make sure that the c_int used in snap_context has 32-bit size
Diffstat (limited to 'modules')
-rw-r--r-- | modules/snap_context/__init__.py | 2 | ||||
-rw-r--r-- | modules/snap_context/utils_shader.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/snap_context/__init__.py b/modules/snap_context/__init__.py index b7bdf17d..0c17b2cb 100644 --- a/modules/snap_context/__init__.py +++ b/modules/snap_context/__init__.py @@ -92,7 +92,7 @@ class SnapContext(): self._texture = self._offscreen.color_texture bgl.glBindTexture(bgl.GL_TEXTURE_2D, self._texture) - NULL = bgl.Buffer(bgl.GL_INT, 1, (ctypes.c_int * 1).from_address(0)) + NULL = bgl.Buffer(bgl.GL_INT, 1, (ctypes.c_int32 * 1).from_address(0)) bgl.glTexImage2D(bgl.GL_TEXTURE_2D, 0, bgl.GL_R32UI, self.region.width, self.region.height, 0, bgl.GL_RED_INTEGER, bgl.GL_UNSIGNED_INT, NULL) del NULL diff --git a/modules/snap_context/utils_shader.py b/modules/snap_context/utils_shader.py index 769c6dbb..1758585a 100644 --- a/modules/snap_context/utils_shader.py +++ b/modules/snap_context/utils_shader.py @@ -30,7 +30,7 @@ def check_shaderError(shader, flag, isProgram, errorMessage): import numpy as np import ctypes - offset = bgl.Buffer(bgl.GL_INT, 1, (ctypes.c_int * 1).from_address(0)) + offset = bgl.Buffer(bgl.GL_INT, 1, (ctypes.c_int32 * 1).from_address(0)) error = bgl.Buffer(bgl.GL_BYTE, 1024) if isProgram: bgl.glGetProgramInfoLog(shader, 1024, offset, error) |