Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the problem: MacBook Screen has only 1/4 Problem #67

Open
CrispyFlowe opened this issue Mar 9, 2022 · 3 comments
Open

Fix the problem: MacBook Screen has only 1/4 Problem #67

CrispyFlowe opened this issue Mar 9, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@CrispyFlowe
Copy link

CrispyFlowe commented Mar 9, 2022

If you have problem when you using Mac:
if the size was only 1/4, like this

Screen Shot 2022-03-06 at 10 00 06 PM

Python Minecraft Clone(MCPY) All platform Version
https://github.com/CrispyFlowe/PythonMinecraftClone-Compatible-with-all-platforms-Version

You can try to change like this:

def on_resize(self, width, height)

            def on_resize(self, width, height):

	    print(f"Resize {width} * {height}")

                # before: gl.glViewport(0, 0, width, height)
	    gl.glViewport(0, 0, width * 2, height * 2) # multiply width & height by 2

	    self.camera.width = width
	    self.camera.height = height

It will be normal:

DISPLAY

  • CrispyFlowe

If you still have problem, you can contact me at

if MacBook have this problem, I suggest

#import platform

                def on_resize(self, width, height):
	        printf("Resize %d * %d", width, height)

                    if (platform.system() == "Darwin"):
	    	    width = width * 2
		    height = height * 2

	        self.camera.width = width
	        self.camera.height = height
@CrispyFlowe CrispyFlowe changed the title MacBook Screen has only 1/4 Solution Fix the problem: MacBook Screen has only 1/4 Problem Mar 9, 2022
@obiwac obiwac added the bug Something isn't working label Mar 9, 2022
@obiwac
Copy link
Owner

obiwac commented Mar 10, 2022

Thanks but I think it'd be better to fix this upstream in Pyglet than to use a hack ;)

@drakeerv
Copy link
Contributor

drakeerv commented Mar 17, 2022

Maybe related: Issue @obiwac

@obiwac
Copy link
Owner

obiwac commented Mar 17, 2022

Probably yeah. That's an issue for Pyglet to fix though; I'll write a fix next time I'm in front of a Mac I can test this on ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants