-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Description
When building another project of yours that uses librw on the Macbook Pro M1, the in-game rendered world is incorrectly sized. It is roughly twice the width and height vs the actual framebuffer. This is probably due to Retina.
I was able to fix it by changing the following
Lines 1256 to 1257 in 373f839
| float32 invwx = 1.0f/cam->viewWindow.x; | |
| float32 invwy = 1.0f/cam->viewWindow.y; |
to
float32 invwx = 1.0f/cam->viewWindow.x/2;
float32 invwy = 1.0f/cam->viewWindow.y/2;
and by changing
Lines 1400 to 1401 in 373f839
| glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, (dst->height-src->height)-y, | |
| 0, 0, src->width, src->height); |
to
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, (dst->height-src->height)-y,
src->width/2, src->height/2, src->width, src->height);
I'm not knowledable enough in your engine or OpenGL to see why this happens, but if you are unable, or unwilling, I can try to investigate the root cause, if there is one.
Metadata
Metadata
Assignees
Labels
No labels