Skip to content

Commit 9d76cfc

Browse files
Paul V Cravenclaude
andcommitted
Use arcade.gl.enums.NEAREST instead of pyglet GL import
Per review feedback: pyglet.graphics.api.gl imports are backend-specific and would break WebGL. arcade.gl.enums is backend-agnostic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent daea82c commit 9d76cfc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arcade/examples/gui/exp_controller_inventory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
import pyglet.font
2020
from pyglet.event import EVENT_HANDLED
21-
from pyglet.graphics.api.gl import GL_NEAREST
2221
from pyglet.input import Controller
2322

2423
import arcade
24+
from arcade.gl.enums import NEAREST
2525
from arcade import Rect
2626
from arcade.examples.gui.exp_controller_support_grid import (
2727
ControllerIndicator,
@@ -412,8 +412,8 @@ def on_draw_before_ui(self):
412412

413413
if __name__ == "__main__":
414414
# pixelate the font
415-
pyglet.font.base.Font.texture_min_filter = GL_NEAREST # type: ignore
416-
pyglet.font.base.Font.texture_mag_filter = GL_NEAREST # type: ignore
415+
pyglet.font.base.Font.texture_min_filter = NEAREST # type: ignore
416+
pyglet.font.base.Font.texture_mag_filter = NEAREST # type: ignore
417417

418418
load_kenney_fonts()
419419

0 commit comments

Comments
 (0)