Skip to content

Commit 56ffb6b

Browse files
committed
Disable npot texture restriction and mock pyglet
1 parent 42d0af6 commit 56ffb6b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pywavefront/visualization.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
from pywavefront.mesh import Mesh
3939
from pywavefront.material import Material
4040

41+
# Mock the _nearest_pow2 method to allow for npot textures
42+
def same(v):
43+
return v
44+
45+
pyglet.image._nearest_pow2 = same
4146

4247
VERTEX_FORMATS = {
4348
'V3F': GL_V3F,
@@ -134,7 +139,7 @@ def load_image(name):
134139
"""Load an image"""
135140
image = pyglet.image.load(name)
136141
texture = image.get_texture()
137-
verify_dimensions(texture)
142+
# verify_dimensions(texture)
138143
return texture
139144

140145

0 commit comments

Comments
 (0)