All Downloads are FREE. Search and download functionalities are using the official Maven repository.

linuxX64Main.com.soywiz.kgl.KmlGlNative.kt Maven / Gradle / Ivy

There is a newer version: 4.0.10
Show newest version
// 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