Beispiel #1
0
    def get_texture(self):
        loaded_texture = pyglet.image.load(self.path).get_texture()

        pyglet.gl.glTexParameterf(pyglet.gl.GL_TEXTURE_2D,
                                  self.flags["texture mode"][0],
                                  self.flags["texture mode"][2])

        pyglet.gl.glTexParameterf(pyglet.gl.GL_TEXTURE_2D,
                                  self.flags["texture mode"][1],
                                  self.flags["texture mode"][2])

        Log.successful(f"Successfully loaded texture from file '{self.path}'")
        return pyglet.graphics.TextureGroup(loaded_texture)
Beispiel #2
0
 def get_image(self):
     loaded_image = pyglet.image.load(self.path)
     Log.successful(f"Successfully loaded image from file '{path}'")
     return loaded_image