chore(nimqml): Add threaded renderer support

This commit is contained in:
Alex Jbanca 2023-03-02 10:49:18 +02:00
parent 3769de5030
commit bf7c4f0c51
No known key found for this signature in database
GPG Key ID: 6004079575C21C5D
2 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,7 @@ proc dos_chararray_delete(str: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_application_dir_path(): cstring {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_application_dir_path(): cstring {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_enable_hdpi(uiScaleFilePath: cstring) {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_enable_hdpi(uiScaleFilePath: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_initialize_opengl() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_initialize_opengl() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_try_enable_threaded_renderer() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_exec() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_exec() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_quit() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_quit() {.cdecl, dynlib: dynLibName, importc.}

View File

@ -61,6 +61,9 @@ proc enableHDPI*(uiScaleFilePath: string) =
proc initializeOpenGL*() = proc initializeOpenGL*() =
dos_qguiapplication_initialize_opengl() dos_qguiapplication_initialize_opengl()
proc tryEnableThreadedRenderer*() =
dos_qguiapplication_try_enable_threaded_renderer()
proc applicationDirPath*(app: QGuiApplication): string = proc applicationDirPath*(app: QGuiApplication): string =
let str = dos_qguiapplication_application_dir_path() let str = dos_qguiapplication_application_dir_path()
result = $str result = $str