[Bf-extensions-cvs] [3b601c6e] master: Fix T53074: Make sure that the c_int used in snap_context has 32-bit size
Germano
noreply at git.blender.org
Sun Oct 15 16:43:52 CEST 2017
Commit: 3b601c6ec881b6309a286d7279b5df69a36fb97a
Author: Germano
Date: Sun Oct 15 12:43:46 2017 -0200
Branches: master
https://developer.blender.org/rBA3b601c6ec881b6309a286d7279b5df69a36fb97a
Fix T53074: Make sure that the c_int used in snap_context has 32-bit size
===================================================================
M modules/snap_context/__init__.py
M modules/snap_context/utils_shader.py
===================================================================
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)
More information about the Bf-extensions-cvs
mailing list