-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rendering API option to switch between hardware acceleration or s…
…oftware rendering
- Loading branch information
1 parent
af8282a
commit 2d27204
Showing
8 changed files
with
106 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/jvmMain/kotlin/com/sunnychung/application/multiplatform/hellohttp/model/RenderingApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.sunnychung.application.multiplatform.hellohttp.model | ||
|
||
import com.sunnychung.application.multiplatform.hellohttp.platform.LinuxOS | ||
import com.sunnychung.application.multiplatform.hellohttp.platform.MacOS | ||
import com.sunnychung.application.multiplatform.hellohttp.platform.OS | ||
import com.sunnychung.application.multiplatform.hellohttp.platform.WindowsOS | ||
|
||
enum class RenderingApi(val value: String?) { | ||
Default(null), OpenGL("OPENGL"), Software("SOFTWARE") | ||
} | ||
|
||
fun getApplicableRenderingApiList(os: OS): List<RenderingApi> { | ||
return when (os) { | ||
MacOS -> RenderingApi.values().filter { it != RenderingApi.OpenGL } | ||
LinuxOS -> RenderingApi.values().filter { it != RenderingApi.OpenGL } | ||
WindowsOS -> RenderingApi.values().toList() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters