linuxX64Main.com.soywiz.kgl.KmlGlNative.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of korgw Show documentation
Show all versions of korgw Show documentation
Portable UI with accelerated graphics support for Kotlin
// WARNING: File autogenerated DO NOT modify
// https://www.khronos.org/registry/OpenGL/api/GLES2/gl2.h
@file:Suppress("unused", "RedundantUnitReturnType", "PropertyName")
package com.soywiz.kgl
import com.soywiz.kmem.*
import kotlinx.cinterop.*
import com.soywiz.korim.bitmap.*
import com.soywiz.korim.format.*
import platform.posix.*
private val GL_MODULE by lazy { dlopen("libGL.so", 0) }
val glXGetProcAddress by lazy {
//dlsym(GL_MODULE, "glXGetProcAddress")?.reinterpret2 CPointer?>>>()
dlsym(GL_MODULE, "glXGetProcAddress")?.reinterpret2) -> CPointer?>>>()
?: error("Can't get glXGetProcAddress")
}
internal actual fun glGetProcAddressAnyOrNull(name: String): COpaquePointer? = memScoped {
glXGetProcAddress(name.cstr.placeTo(this)) ?: dlsym(GL_MODULE, name)
}
actual class KmlGlNative actual constructor() : NativeBaseKmlGl() {
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy