Why retina screen coordinate value is twice the value of pixel value

后端 未结 3 715
野性不改
野性不改 2020-12-18 03:20

My computer is a Mac pro with a 13 inch retina screen. The screen resolution is 1280*800 (default).

Using the following code:

gWindow = glfwCreateWi         


        
3条回答
  •  甜味超标
    2020-12-18 03:51

    With retina display, the default framebuffer (the one that rendered onto the canvas) is twice the resolution of the display. Thus, if the display is 800x600, the internal canvas is 1600x1200, and therefore your viewpoert should be 1600x1200 since this is the "window" into the framebuffer.

提交回复
热议问题