File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -968,6 +968,7 @@ def __init__(
968
968
enable_backface_culling = True ,
969
969
enable_mouse_interaction = True ,
970
970
enable_keyboard_interaction = True ,
971
+ device = None ,
971
972
):
972
973
"""
973
974
Args:
@@ -997,6 +998,7 @@ def __init__(
997
998
enable_backface_culling (bool): Whether to enable backface culling.
998
999
enable_mouse_interaction (bool): Whether to enable mouse interaction.
999
1000
enable_keyboard_interaction (bool): Whether to enable keyboard interaction.
1001
+ device (Devicelike): Where to store the internal data.
1000
1002
1001
1003
Note:
1002
1004
@@ -1040,7 +1042,11 @@ def __init__(
1040
1042
self .render_depth = render_depth
1041
1043
self .enable_backface_culling = enable_backface_culling
1042
1044
1043
- self ._device = wp .get_preferred_device ()
1045
+ if device is None :
1046
+ self ._device = wp .get_preferred_device ()
1047
+ else :
1048
+ self ._device = wp .get_device (device )
1049
+
1044
1050
self ._title = title
1045
1051
1046
1052
self .window = pyglet .window .Window (
You can’t perform that action at this time.
0 commit comments