SDL 2.0 retina mac

后端 未结 2 696
抹茶落季
抹茶落季 2021-01-02 10:13

I have been playing around with SDL 2.0 but after searching I haven\'t found anything online about how to support retina macs. When creating a window using the following cod

2条回答
  •  离开以前
    2021-01-02 10:54

    Current versions of SDL2 have support for retina.

    To create a retina window, pass a flag SDL_WINDOW_ALLOW_HIGHDPI into SDL_CreateWindow().

    After a resize event, you can check the actual buffer resolution with the API call SDL_GL_GetDrawableSize().

提交回复
热议问题