StanislavPetrovV / 3D-Graphics-Engine

OpenGL Graphics Engine in Python ( Pygame, ModernGL )
MIT License
83 stars 29 forks source link

pg.transform.flip takes no arguments #2

Open Rakomi opened 1 year ago

Rakomi commented 1 year ago

When I execute main.py I get an error. It seems that in texture.py, pg.transform.flip is suppose to return a texture flipped along x or y but this function apparently takes no keyword arguments. Here's my console output (removed the path above):

pygame 2.0.1 (SDL 2.0.14, Python 3.9.1)
Hello from the pygame community. https://www.pygame.org/contribute.html
Unimplemented OBJ format statement 'Tf' on line '   Tf 1.0000 1.0000 1.0000'
Traceback (most recent call last):
  File "C:\3D-Graphics-Engine\main.py", line 75, in <module>
    app = GraphicsEngine()
  File "C:\3D-Graphics-Engine\main.py", line 40, in __init__
    self.mesh = Mesh(self)
  File "C:\3D-Graphics-Engine\mesh.py", line 9, in __init__
    self.texture = Texture(app)
  File "C:\3D-Graphics-Engine\texture.py", line 11, in __init__
    self.textures[0] = self.get_texture(path='textures/img.png')
  File "C:\3D-Graphics-Engine\texture.py", line 47, in get_texture
    texture = pg.transform.flip(texture, flip_x=False, flip_y=True)
TypeError: flip() takes no keyword arguments
poxford3 commented 10 months ago

Could you post the code where the error is occurring?

File "C:\3D-Graphics-Engine\texture.py", line 47, in get_texture texture = pg.transform.flip(texture, flip_x=False, flip_y=True)

Could be a bad pathway for the texture after it was loaded by Pygame