0
\$\begingroup\$

I have just started working with pyglet trying to make a simple game as a hobby. However, I have run into an issue. I am working with this demo:

https://github.com/pyglet/pyglet/blob/pyglet-1.5-maintenance/examples/window/camera.py

and I am getting the error:

AttributeError: module 'pyglet.gl' has no attribute 'glTranslatef'.

I was wondering if anyone might have some ideas as why this might happen. I have installed pyglet using pip install pyglet and I am running on a MacBook if that matters.

Thank you

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I am not familiar with pyglet, but the latest published version is 2.0.6 (found on PyPI) and you are using an example from version 1.5. So, it is likely that the library has made some changes to what things are called.

You should use an example from the version you installed, instead.

\$\endgroup\$
2
  • \$\begingroup\$ Ah I see, was rushed and just copied the example on my way out the door without paying attention. I’ll check it out and see if it works \$\endgroup\$ Commented May 7, 2023 at 0:53
  • \$\begingroup\$ Yes it worked! Thank you! \$\endgroup\$ Commented May 7, 2023 at 1:25

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.