From 709974412a5d3030e40608cc7b661991828ae3b3 Mon Sep 17 00:00:00 2001 From: Roz K Date: Fri, 23 Dec 2022 10:14:05 +0100 Subject: [PATCH] Add a buffer method to hide ctypes array contruction. --- __init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/__init__.py b/__init__.py index 758d012..e40b861 100644 --- a/__init__.py +++ b/__init__.py @@ -85,6 +85,9 @@ INSTANCE_FLAG_VISIBLE = _flag(1) BATCH_MAX_SIZE = 65536 +def buffer(type, size): + return (type * size)() + _vec3p = ctypes.POINTER(vec3) _vec4p = ctypes.POINTER(vec4) _mat3p = ctypes.POINTER(mat3)