osx - OpenGL created window size twice as large -


i'm running learn opengl tutorials on macbook pro 2015. generated window dimension twice large set. (e.g., set 800x600 in code, got 1600x1200). , triangle code tries draw in lower left quadrant, when it's supposed in center.

what might reason this?

i ran code , didn't make change.

link screenshot.

from glfw faq:

4.3 - why output in lower-left corner of window?

you passing window size, in screen coordinates, glviewport, works pixels. on os x retina display, , possibly on other platforms in future, screen coordinates , pixels not map 1:1. use framebuffer size, in pixels, instead of window size. see window handling guide details.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -