Skip to content

Commit e83c25b

Browse files
author
Frederik De Bleser
committed
Import ctypes directly.
Upcoming versions of Pyglet will not export ctypes anymore. Import the necessary function from ctypes directly.
1 parent 24b2462 commit e83c25b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

nodebox/graphics/geometry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,10 @@ def __repr__(self):
449449
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
450450

451451
from sys import platform
452-
from ctypes import CFUNCTYPE, POINTER, byref, cast
452+
from ctypes import CFUNCTYPE, POINTER, byref, cast, pointer
453453
from ctypes import CFUNCTYPE as _CFUNCTYPE
454454
from pyglet.gl import \
455-
GLdouble, GLvoid, GLenum, GLfloat, pointer, \
455+
GLdouble, GLvoid, GLenum, GLfloat, \
456456
gluNewTess, gluTessProperty, gluTessNormal, gluTessCallback, gluTessVertex, \
457457
gluTessBeginPolygon, gluTessEndPolygon, \
458458
gluTessBeginContour, gluTessEndContour, \

nodebox/graphics/shader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#=== SHADER ==========================================================================================
1+
22
# Fragment shaders, filters, Frame Buffer Object (FBO)
33
# Authors: Tom De Smedt, Frederik De Bleser
44
# License: BSD (see LICENSE.txt for details).
@@ -10,6 +10,7 @@
1010
from context import Image, texture
1111
from geometry import lerp, clamp
1212
from math import radians
13+
from ctypes import byref, cast, c_char, c_char_p, c_uint, c_int, pointer, POINTER
1314

1415
def next(generator, default=None):
1516
try:

0 commit comments

Comments
 (0)