Python Forum
[pyglet] Why is screen blank when displaying a gif when setting fullscreen = True ? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: [pyglet] Why is screen blank when displaying a gif when setting fullscreen = True ? (/thread-22035.html)



[pyglet] Why is screen blank when displaying a gif when setting fullscreen = True ? - Huudzz - Oct-25-2019

(Sorry about my bad english, i'm brazillian)
I created one ui who open one animated gif, when in low screen it works perfectly, but when i add fullscreen = True it's just show me a black screen
Someone can help-me ?
Follow the code

from pyglet.window import pyglet

animation = pyglet.image.load_animation('1.gif')
animSprite = pyglet.sprite.Sprite(animation)


w = animSprite.width
h = animSprite.height

window = pyglet.window.Window(fullscreen = True)
                              


@window.event
def on_draw():
    window.clear()
    animSprite.draw()



pyglet.app.run()