Skip to content

Commit

Permalink
Add init on additional paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
olonho committed Nov 24, 2020
1 parent 624ca78 commit a0a2349
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions skiko/src/jvmMain/kotlin/org/jetbrains/skiko/HardwareLayer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import javax.swing.SwingUtilities.convertPoint
import javax.swing.SwingUtilities.getRootPane

open class HardwareLayer : Canvas(), Drawable {
companion object {
init {
Library.load()
}
}

override fun paint(g: Graphics) {
display()
}
Expand Down
3 changes: 3 additions & 0 deletions skiko/src/jvmMain/kotlin/org/jetbrains/skiko/OpenGLApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class OpenGLApi private constructor() {
external fun glGetIntegerv(pname: Int): Int

companion object {
init {
Library.load()
}
val instance = OpenGLApi()
}
}

0 comments on commit a0a2349

Please sign in to comment.