简体   繁体   中英

HighDPI retina windows in pyglet

Is there a way to create a retina window in pyglet?

The default pyglet.window.Window() creates a window that is blurry on my retina screen. Is there a setting in pyglet or do I have to dive into the Open GL plumbing to do this?

It seems that pyglet 1.3 is not aware of Retina displays. Despite of what pyglet window doc says, the window.get_size() method returns points instead of pixels . That's an issue coming from the way Apple has designed High Resolution stuff.

Apple info:

Likely you can't use the setWantsBestResolutionOpenGLSurface parameter.

So your best bet is doubling the sizes to be used at glViewport . And following this path, also double the sizes (2x*2y = 4*x*y) of FBO buffers, textures, and positions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM