-
Notifications
You must be signed in to change notification settings - Fork 180
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
Switch pyglet to programmable pipeline #158
Conversation
Hi @matthewturk! Thanks for PR! Unfortunately, I couldn't get that running with the built-in pyglet example on macOS. I suppose that default GL context created by Pyglet on macOS on my mac is still 2.1 and I haven't find a way to successfully create higher level context with recent Pyglet version. As proposed change is quite small code-wise but has large backwards-incompatibility risk here is my suggestion:
Of course if we allow for both integrations it would be great to have some working example in |
This is great -- thank you for the feedback and suggestions! I'll get on this. |
I think this version hits what you've suggested, @swistakm . I tried to implement some checks based on the OpenGL context, but after reading pyglet/pyglet#76 I came to the conclusion that it's safer to look at pyglet versions rather than the contexts. I've tested this with both the development pyglet and the stable pyglet and both work using I wasn't sure where else to add things to the documentation, but I added a note about the difference here to the part that mentions pyglet. |
self.on_mouse_scroll, | ||
self.on_resize, | ||
) | ||
class PygletRenderer(PygletFixedPipelineRenderer): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
DeprecationWarning) | ||
super(PygletRenderer, self).__init__(window, attach_callbacks) | ||
|
||
def create_renderer(window, attach_callbacks=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Great! I'm merging it :) |
Feature released in 1.2.0 |
Pyglet 2.0 in dev requires using the programmable pipeline, and pyglet 1.5 allows it. This lets the in-dev pyglet version work with the pyglet integration with no additional changes.