Replies: 6 comments
|
display.h includes the functions for querying the screen resolution. Kinc applications are dpi-aware nowadays so they report the real resolution on a high-dpi screen - might that be the problem here? |
|
If I modify the Kinc-Samples / Texture-Kinc repo (git clone --recursive https://github.com/Kinc-Samples/Texture-Kinc.git) and add the following lines to the start of the kickstart function I am still getting incorrect dimensions on a RMBP (kinc_log outputs 800 x 600 on a 1440 x 900 MBP display): |
|
Looks like I still have to actually implement the display API for macOS. |
|
The following code seems to work for the display API for macOS in terms of getting width and height. If the display index that is passed to the function is out of bounds I am not sure whether you expect an error to be thrown, or whether to return a kinc_display_mode_t with width, height of 0. Let me know if I should do a pull request with this code, or whether you want me to tackle the problem in a different way. For refresh rate it looks like this has to be used: https://developer.apple.com/documentation/coregraphics/quartz_display_services, however NSScreen doesn't provide access to the same ID as CGDirectDisplayID which would require iterating the displays in a different way than currently implemented. |
|
Yes, please send a pull request. I love pull requests. |

Uh oh!
There was an error while loading. Please reload this page.
I am in the midst or porting my project from Kore to Kinc and am encountering an issue with the resolution of the application on Mac OS.
If I use the following code the window launches fullscreen :
However, if I assign the width and height to variables and utilize them for kinc_window_options and kinc_init the application's window only occupies half of the width and height of the screen's resolution.
Obviously I am missing something here, but I am confused. Also, does Kinc include a way to get the resolution of a device's screen, or does that code have to be written on a per-platform basis?
All reactions