简体   繁体   English

pyglet中的HighDPI视网膜窗口

[英]HighDPI retina windows in pyglet

Is there a way to create a retina window in pyglet? 有没有办法在pyglet中创建视网膜窗口?

The default pyglet.window.Window() creates a window that is blurry on my retina screen. 默认的pyglet.window.Window()创建的窗口在我的视网膜屏幕上模糊。 Is there a setting in pyglet or do I have to dive into the Open GL plumbing to do this? pyglet中是否有设置,还是我必须深入研究Open GL管道?

It seems that pyglet 1.3 is not aware of Retina displays. 似乎pyglet 1.3无法识别Retina显示器。 Despite of what pyglet window doc says, the window.get_size() method returns points instead of pixels . 不管pyglet窗口文档怎么说, window.get_size()方法都返回而不是pixel That's an issue coming from the way Apple has designed High Resolution stuff. 这是苹果设计高分辨率产品的方式带来的问题。

Apple info: 苹果信息:

Likely you can't use the setWantsBestResolutionOpenGLSurface parameter. 可能您不能使用setWantsBestResolutionOpenGLSurface参数。

So your best bet is doubling the sizes to be used at glViewport . 因此,最好的选择是将glViewport使用的大小加倍 And following this path, also double the sizes (2x*2y = 4*x*y) of FBO buffers, textures, and positions. 按照此路径,还将FBO缓冲区,纹理和位置的大小(2x * 2y = 4 * x * y)加倍。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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