Save
Saving
  • A
    Aleph1

    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 :

    kinc_window_options_t kinc_window_options;
    kinc_window_options.width = 1440;
    kinc_window_options.height = 900;
    kinc_init("VieTest", 1440, 900, &kinc_window_options, NULL);
    

    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.

    int width = 1440;
    int height = 900;
    kinc_window_options_t kinc_window_options;
    kinc_window_options.width = width;
    kinc_window_options.height = height;
    kinc_init("VieTest", width, height, &kinc_window_options, NULL);
    

    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?

    I have also posted this on GitHub discussions (https://github.com/Kode/Kinc/discussions/578) as I just saw the pinned note.

    posted in Kode read more
  • A
    Aleph1

    @Robert it might take me a couple of days to get to this as I am still using Kode vs Kinc, and it looks like the Mac backend has changed significantly. Is Kinc stable(ish) now? If so I can attempt to upgrade to it.

    posted in Kode read more
  • A
    Aleph1

    I am trying to determine display resolution with Kore/Kode before spawning a window. On MacOS Mojave if I use the width and height methods of Kore::Display::primary() I get the values 1440 x 877, whereas the display resolution is actually 1440 x 900. I think this has to do with using [screen visibleFrame] vs [screen frame] in the Mac backend. Is there a better approach to getting these values? Would it would be possible to modify the function footprint for the width and height to accept a boolean as to whether to include menus in the calculation?

    posted in Kode read more
  • A
    Aleph1

    I have used the following example as a foundation for an engine I am building, but trying to understand what line 46 does, pipeline->inputLayout[1] = nullptr;

    https://github.com/Kore-Samples/Shader-Kore/blob/master/Sources/Shader.cpp

    If I comment that line out from any of my PipelineState instances and compile as OpenGL or Metal on OS X the pipeline still works as expected. Is this only required for other renderers (DirectX, etc.)?

    posted in Kode read more