Skip to content

Commit 3f9d875

Browse files
Update to latest pyrr geometry functions.
1 parent db38cc6 commit 3f9d875

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pygly/examples/renderable_colour_cube.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from pyrr import geometry
1010

1111

12-
vertices = geometry.create_cube(scale=(2.0,2.0,2.0), dtype='float32')
12+
vertices, indices = geometry.create_cube(scale=(2.0,2.0,2.0), dtype='float32')
13+
vertices = vertices[indices]
1314
vertices.dtype = [('position', 'float32', (3,)),]
1415

1516

pygly/examples/renderable_cube.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
(1.0, 1.0, 0.0,),
1818
(1.0, 0.0, 0.0,),
1919
)
20-
vertices = geometry.create_cube(scale=(2.0,2.0,2.0), rgba=rgba, dtype='float32')
20+
vertices, indices = geometry.create_cube(scale=(2.0,2.0,2.0), rgba=rgba, dtype='float32')
21+
vertices = vertices[indices]
2122
vertices.dtype = [
2223
('position', 'float32', (3,)),
2324
('colour', 'float32', (3,)),

pygly/examples/renderable_textured_quad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from pyrr import geometry
1010

1111

12-
vertices = geometry.create_quad(scale=(5.0,5.0), st=True, dtype='float32')
12+
vertices, indices = geometry.create_quad(scale=(5.0,5.0), st=True, dtype='float32')
13+
vertices = vertices[indices]
1314
vertices.dtype = [
1415
('position', 'float32', (3,)),
1516
('texture_coord', 'float32', (2,)),

0 commit comments

Comments
 (0)