szabolcsdombi/zengl

Examples only cover lower-left corner of Pyglet window

Closed this issue · 4 comments

akx commented

Broke this out of #18.

The examples only cover the lower-left corner of the Pyglet window:

Screenshot 2022-06-02 at 21 15 04

Screenshot 2022-06-02 at 21 18 38

Other output, such as the mp4 generated by ffmpeg_stream.py are just fine (1280x720).


Python 3.9.12 on macOS 10.15.7 on AMD Radeon Pro 5500M 4 GB graphics (macbook pro 2019), libraries:

ffmpeg-python==0.2.0
glcontext==2.3.6
moderngl==5.6.4
Pillow==9.1.1
pyglet==1.5.26

hi, thank you for reporting this.

it seems the window size is not aligned with the framebuffer size.
I have to look into how to get the proper framebuffer size.
right now the examples assume a 1280x720 window needs a 1280x720 framebuffer (taking the size from the window directly).
for me it seems the retina display requires the width and height to be doubled.

the actual fix should go into the window.py fixing all the windowed examples.
the window.size property is not set properly.

i look into this

akx commented

Just got back to the office and was about to report that this isn't an issue on the external LoDPI screen :) I'll try out the PR!

so #20 does not resolve the issue?

the examples are not resizable as it would require extra logic that is out of the scope of the basic examples.
however, I plan to add examples for resizable windows too.