Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uniforms in pyglet.graphics.shader #1103

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyglet/graphics/shader.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,13 @@ def __repr__(self):


class _Uniform:
__slots__ = 'type', 'size', 'location', 'length', 'count', 'get', 'set'
__slots__ = 'type', 'size', 'location', 'length', 'count', 'get', 'set', 'program'

def __init__(self, program, uniform_type, size, location, dsa):
self.type = uniform_type
self.size = size
self.location = location
self.program = program

gl_type, gl_setter_legacy, gl_setter_dsa, length = _uniform_setters[uniform_type]
gl_setter = gl_setter_dsa if dsa else gl_setter_legacy
Expand Down
Loading