diff --git a/modules/overrungl.opengl/src/generator/kotlin/overrungl/opengl/OpenGLGenerator.kt b/modules/overrungl.opengl/src/generator/kotlin/overrungl/opengl/OpenGLGenerator.kt index 9d3a926b..35bb146c 100644 --- a/modules/overrungl.opengl/src/generator/kotlin/overrungl/opengl/OpenGLGenerator.kt +++ b/modules/overrungl.opengl/src/generator/kotlin/overrungl/opengl/OpenGLGenerator.kt @@ -18,12 +18,40 @@ package overrungl.opengl import overrungl.opengl.OpenGLExt.* import java.nio.file.Files +import java.time.Clock +import java.time.LocalDate import kotlin.io.path.Path enum class OpenGLExt(val dir: String, val packageName: String, val extName: String) { CORE("", "", ""), - ARB("ext/arb", ".ext.arb", "ARB"), - KHR("ext/khr", ".ext.khr", "KHR") + ARB("ext/arb/", ".ext.arb", "ARB"), + KHR("ext/khr/", ".ext.khr", "KHR"), + OES("ext/oes/", ".ext.oes", "OES"), + `3DFX`("ext/", ".ext", "3DFX"), + AMD("ext/amd/", ".ext.amd", "AMD"), + APPLE("ext/apple/", ".ext.apple", "APPLE"), + ATI("ext/ati/", ".ext.ati", "ATI"), + EXT("ext/ext/", ".ext.ext", "EXT"), + GREMEDY("ext/", ".ext", "GREMEDY"), + HP("ext/", ".ext", "HP"), + IBM("ext/ibm/", ".ext.ibm", "IBM"), + INGR("ext/", ".ext", "INGR"), + INTEL("ext/intel/", ".ext.intel", "INTEL"), + MESAX("ext/mesa/", ".ext.mesa", "MESAX"), + MESA("ext/mesa/", ".ext.mesa", "MESA"), + NVX("ext/nv/", ".ext.nv", "NVX"), + NV("ext/nv/", ".ext.nv", "NV"), + OML("ext/", ".ext", "OML"), + OVR("ext/", ".ext", "OVR"), + PGI("ext/", ".ext", "PGI"), + REND("ext/", ".ext", "REND"), + S3("ext/", ".ext", "S3"), + SGIS("ext/sgi/", ".ext.sgi", "SGIS"), + SGIX("ext/sgi/", ".ext.sgi", "SGIX"), + SGI("ext/sgi/", ".ext.sgi", "SGI"), + SUNX("ext/sun/", ".ext.sun", "SUNX"), + SUN("ext/sun/", ".ext.sun", "SUN"), + WIN("ext/", ".ext", "WIN") } data class Type(val name: String, val layout: String?) { @@ -31,6 +59,29 @@ data class Type(val name: String, val layout: String?) { override fun toString(): String = name } +val fileHeader = """/* + * MIT License + * + * Copyright (c) 2022-${LocalDate.now(Clock.systemUTC()).year} Overrun Organization + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + */ + +// This file is auto-generated. DO NOT EDIT!""" + +private val generatedFunctions = ArrayList() +private val generatedExtFunctions = ArrayList() +private val generatedClasses = ArrayList() +private val generatedExtClasses = ArrayList() + val void = Type("void", null) val boolean = Type("boolean", "JAVA_BYTE") val byte = Type("byte", "JAVA_BYTE") @@ -71,9 +122,9 @@ data class Function( ) class OpenGLFile( - private val name: String, - private val ext: OpenGLExt = CORE, - private val extName: String = "EXT" + val name: String, + val ext: OpenGLExt, + private val extName: String ) { private val constants = LinkedHashMap() private val functions = ArrayList() @@ -82,16 +133,22 @@ class OpenGLFile( constants[this] = value } - operator fun String.invoke(returnType: Type, vararg params: Parameter, nativeType: String?=null) { - functions.add(Function(this, returnType, nativeType, params.toList())) + operator fun String.invoke(returnType: Type, vararg params: Parameter, nativeType: String? = null) { + Function(this, returnType, nativeType, params.toList()).also { + functions.add(it) + when (ext) { + CORE -> generatedFunctions.add(it) + else -> generatedExtFunctions.add(it) + } + } } internal fun generate() { - Files.writeString(Path("${ext.dir}/GL${ext.extName}$name.java"), buildString { + Files.writeString(Path("${ext.dir}GL${ext.extName}$name.java"), buildString { // file-header appendLine( """ - // this file is auto-generated. DO NOT EDIT! + $fileHeader package overrungl.opengl${ext.packageName}; import overrungl.*; @@ -132,7 +189,7 @@ class OpenGLFile( // functions functions.forEach { f -> append(" public static ") - if (f.nativeType!=null) + if (f.nativeType != null) append("@NativeType(\"${f.nativeType}\") ") append("${f.returnType} ${f.name}(") f.params.forEachIndexed { index, it -> @@ -168,16 +225,22 @@ class OpenGLFile( fun file( name: String, ext: OpenGLExt = CORE, - extName: String = "EXT", + extName: String = "GL", block: OpenGLFile.() -> Unit ) { - OpenGLFile(name, ext, extName).also(block).generate() + OpenGLFile(name, ext, extName).also { + block(it) + when (ext) { + CORE -> generatedClasses.add(it) + else -> generatedExtClasses.add(it) + } + }.generate() } fun file( name: String, ext: OpenGLExt = CORE, - extName: String = "EXT", + extName: String = "GL", vararg const: Pair ) { file(name, ext, extName) { @@ -231,8 +294,20 @@ fun arb() { "GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB"("0x9342") "GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB"("0x9343") "glEvaluateDepthValuesARB"(void) - "glFramebufferSampleLocationsfvARB"(void, int("target"), int("start"), int("count"), address("v", "const GLfloat *v")) - "glNamedFramebufferSampleLocationsfvARB"(void, int("framebuffer"), int("start"), int("count"), address("v", "const GLfloat *v")) + "glFramebufferSampleLocationsfvARB"( + void, + int("target"), + int("start"), + int("count"), + address("v", "const GLfloat *v") + ) + "glNamedFramebufferSampleLocationsfvARB"( + void, + int("framebuffer"), + int("start"), + int("count"), + address("v", "const GLfloat *v") + ) } file("SampleShading", ARB, "GL_ARB_sample_shading") { "GL_SAMPLE_SHADING_ARB"("0x8C36") @@ -278,7 +353,13 @@ fun arb() { "glGetHandleARB"(int, int("pname")) "glDetachObjectARB"(void, int("containerObj"), int("attachedObj")) "glCreateShaderObjectARB"(int, int("shaderType")) - "glShaderSourceARB"(void, int("shaderObj"), int("count"), address("string", "const GLcharARB**"), address("length", "const GLint*")) + "glShaderSourceARB"( + void, + int("shaderObj"), + int("count"), + address("string", "const GLcharARB**"), + address("length", "const GLint*") + ) "glCompileShaderARB"(void, int("shaderObj")) "glCreateProgramObjectARB"(int) "glAttachObjectARB"(void, int("containerObj"), int("obj")) @@ -301,13 +382,43 @@ fun arb() { "glUniform2ivARB"(void, int("location"), int("count"), address("value", "const GLint*")) "glUniform3ivARB"(void, int("location"), int("count"), address("value", "const GLint*")) "glUniform4ivARB"(void, int("location"), int("count"), address("value", "const GLint*")) - "glUniformMatrix2fvARB"(void, int("location"), int("count"), boolean("transpose"), address("value", "const GLfloat*")) - "glUniformMatrix3fvARB"(void, int("location"), int("count"), boolean("transpose"), address("value", "const GLfloat*")) - "glUniformMatrix4fvARB"(void, int("location"), int("count"), boolean("transpose"), address("value", "const GLfloat*")) + "glUniformMatrix2fvARB"( + void, + int("location"), + int("count"), + boolean("transpose"), + address("value", "const GLfloat*") + ) + "glUniformMatrix3fvARB"( + void, + int("location"), + int("count"), + boolean("transpose"), + address("value", "const GLfloat*") + ) + "glUniformMatrix4fvARB"( + void, + int("location"), + int("count"), + boolean("transpose"), + address("value", "const GLfloat*") + ) "glGetObjectParameterfvARB"(void, int("obj"), int("pname"), address("params", "GLfloat*")) "glGetObjectParameterivARB"(void, int("obj"), int("pname"), address("params", "GLint*")) - "glGetInfoLogARB"(void, int("obj"), int("maxLength"), address("length", "GLsizei*"), address("infoLog", "GLcharARB*")) - "glGetAttachedObjectsARB"(void, int("containerObj"), int("maxCount"), address("count", "GLsizei*"), address("obj", "GLhandleARB*")) + "glGetInfoLogARB"( + void, + int("obj"), + int("maxLength"), + address("length", "GLsizei*"), + address("infoLog", "GLcharARB*") + ) + "glGetAttachedObjectsARB"( + void, + int("containerObj"), + int("maxCount"), + address("count", "GLsizei*"), + address("obj", "GLhandleARB*") + ) "glGetUniformLocationARB"(int, int("programObj"), address("name", "const GLcharARB*")) "glGetActiveUniformARB"( void, @@ -321,15 +432,34 @@ fun arb() { ) "glGetUniformfvARB"(void, int("programObj"), int("location"), address("params", "GLfloat*")) "glGetUniformivARB"(void, int("programObj"), int("location"), address("params", "GLint*")) - "glGetShaderSourceARB"(void, int("obj"), int("maxLength"), address("length", "GLsizei*"), address("source", "GLcharARB*")) + "glGetShaderSourceARB"( + void, + int("obj"), + int("maxLength"), + address("length", "GLsizei*"), + address("source", "GLcharARB*") + ) } file("ShadingLanguageInclude", ARB, "GL_ARB_shading_language_include") { "GL_SHADER_INCLUDE_ARB"("0x8DAE") "GL_NAMED_STRING_LENGTH_ARB"("0x8DE9") "GL_NAMED_STRING_TYPE_ARB"("0x8DEA") - "glNamedStringARB"(void, int("type"), int("nameLen"), address("name", "const GLchar*"), int("stringLen"), address("string", "const GLchar*")) + "glNamedStringARB"( + void, + int("type"), + int("nameLen"), + address("name", "const GLchar*"), + int("stringLen"), + address("string", "const GLchar*") + ) "glDeleteNamedStringARB"(void, int("nameLen"), address("name", "const GLchar*")) - "glCompileShaderIncludeARB"(void, int("shader"), int("count"), address("path", "const GLchar *const*"), address("length", "const GLint*")) + "glCompileShaderIncludeARB"( + void, + int("shader"), + int("count"), + address("path", "const GLchar *const*"), + address("length", "const GLint*") + ) "glIsNamedStringARB"(boolean, int("nameLen"), address("name", "const GLchar*")) "glGetNamedStringARB"( void, @@ -339,16 +469,24 @@ fun arb() { address("stringLen", "GLint*"), address("string", "GLchar*") ) - "glGetNamedStringivARB"(void, int("nameLen"), address("name", "const GLchar*"), int("pname"), address("params", "GLint*")) - } - file("Shadow", ARB, "GL_ARB_shadow") { - "GL_TEXTURE_COMPARE_MODE_ARB"("0x884C") - "GL_TEXTURE_COMPARE_FUNC_ARB"("0x884D") - "GL_COMPARE_R_TO_TEXTURE_ARB"("0x884E") - } - file("ShadowAmbient", ARB, "GL_ARB_shadow_ambient") { - "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB"("0x80BF") + "glGetNamedStringivARB"( + void, + int("nameLen"), + address("name", "const GLchar*"), + int("pname"), + address("params", "GLint*") + ) } + file( + "Shadow", ARB, "GL_ARB_shadow", + "GL_TEXTURE_COMPARE_MODE_ARB" to "0x884C", + "GL_TEXTURE_COMPARE_FUNC_ARB" to "0x884D", + "GL_COMPARE_R_TO_TEXTURE_ARB" to "0x884E" + ) + file( + "ShadowAmbient", ARB, "GL_ARB_shadow_ambient", + "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB" to "0x80BF" + ) file("SparseBuffer", ARB, "GL_ARB_sparse_buffer") { "GL_SPARSE_STORAGE_BIT_ARB"("0x0400") "GL_SPARSE_BUFFER_PAGE_SIZE_ARB"("0x82F8") @@ -381,9 +519,10 @@ fun arb() { boolean("commit") ) } - file("TextureBorderClamp", ARB, "GL_ARB_texture_border_clamp") { - "GL_CLAMP_TO_BORDER_ARB"("0x812D") - } + file( + "TextureBorderClamp", ARB, "GL_ARB_texture_border_clamp", + "GL_CLAMP_TO_BORDER_ARB" to "0x812D" + ) file("TextureBufferObject", ARB, "GL_ARB_texture_buffer_object") { "GL_TEXTURE_BUFFER_ARB"("0x8C2A") "GL_MAX_TEXTURE_BUFFER_SIZE_ARB"("0x8C2B") @@ -475,107 +614,118 @@ fun arb() { ) "glGetCompressedTexImageARB"(void, int("target"), int("level"), address("img", "void*")) } - file("TextureCompressionBptc", ARB, "GL_ARB_texture_compression_bptc") { - "GL_COMPRESSED_RGBA_BPTC_UNORM_ARB"("0x8E8C") - "GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB"("0x8E8D") - "GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB"("0x8E8E") - "GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB"("0x8E8F") - } - file("TextureCubeMap", ARB, "GL_ARB_texture_cube_map") { - "GL_NORMAL_MAP_ARB"("0x8511") - "GL_REFLECTION_MAP_ARB"("0x8512") - "GL_TEXTURE_CUBE_MAP_ARB"("0x8513") - "GL_TEXTURE_BINDING_CUBE_MAP_ARB"("0x8514") - "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB"("0x8515") - "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB"("0x8516") - "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB"("0x8517") - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB"("0x8518") - "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB"("0x8519") - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB"("0x851A") - "GL_PROXY_TEXTURE_CUBE_MAP_ARB"("0x851B") - "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB"("0x851C") - } - file("TextureCubeMapArray", ARB, "GL_ARB_texture_cube_map_array") { - "GL_TEXTURE_CUBE_MAP_ARRAY_ARB"("0x9009") - "GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB"("0x900A") - "GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB"("0x900B") - "GL_SAMPLER_CUBE_MAP_ARRAY_ARB"("0x900C") - "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB"("0x900D") - "GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB"("0x900E") - "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB"("0x900F") - } - file("TextureEnvCombine", ARB, "GL_ARB_texture_env_combine") { - "GL_COMBINE_ARB"("0x8570") - "GL_COMBINE_RGB_ARB"("0x8571") - "GL_COMBINE_ALPHA_ARB"("0x8572") - "GL_SOURCE0_RGB_ARB"("0x8580") - "GL_SOURCE1_RGB_ARB"("0x8581") - "GL_SOURCE2_RGB_ARB"("0x8582") - "GL_SOURCE0_ALPHA_ARB"("0x8588") - "GL_SOURCE1_ALPHA_ARB"("0x8589") - "GL_SOURCE2_ALPHA_ARB"("0x858A") - "GL_OPERAND0_RGB_ARB"("0x8590") - "GL_OPERAND1_RGB_ARB"("0x8591") - "GL_OPERAND2_RGB_ARB"("0x8592") - "GL_OPERAND0_ALPHA_ARB"("0x8598") - "GL_OPERAND1_ALPHA_ARB"("0x8599") - "GL_OPERAND2_ALPHA_ARB"("0x859A") - "GL_RGB_SCALE_ARB"("0x8573") - "GL_ADD_SIGNED_ARB"("0x8574") - "GL_INTERPOLATE_ARB"("0x8575") - "GL_SUBTRACT_ARB"("0x84E7") - "GL_CONSTANT_ARB"("0x8576") - "GL_PRIMARY_COLOR_ARB"("0x8577") - "GL_PREVIOUS_ARB"("0x8578") - } - file("TextureEnvDot3", ARB, "GL_ARB_texture_env_dot3") { - "GL_DOT3_RGB_ARB"("0x86AE") - "GL_DOT3_RGBA_ARB"("0x86AF") - } - file("TextureFilterMinmax", ARB, "GL_ARB_texture_filter_minmax") { - "GL_TEXTURE_REDUCTION_MODE_ARB"("0x9366") - "GL_WEIGHTED_AVERAGE_ARB"("0x9367") - } - file("TextureFloat", ARB, "GL_ARB_texture_float") { - "GL_TEXTURE_RED_TYPE_ARB"("0x8C10") - "GL_TEXTURE_GREEN_TYPE_ARB"("0x8C11") - "GL_TEXTURE_BLUE_TYPE_ARB"("0x8C12") - "GL_TEXTURE_ALPHA_TYPE_ARB"("0x8C13") - "GL_TEXTURE_LUMINANCE_TYPE_ARB"("0x8C14") - "GL_TEXTURE_INTENSITY_TYPE_ARB"("0x8C15") - "GL_TEXTURE_DEPTH_TYPE_ARB"("0x8C16") - "GL_UNSIGNED_NORMALIZED_ARB"("0x8C17") - "GL_RGBA32F_ARB"("0x8814") - "GL_RGB32F_ARB"("0x8815") - "GL_ALPHA32F_ARB"("0x8816") - "GL_INTENSITY32F_ARB"("0x8817") - "GL_LUMINANCE32F_ARB"("0x8818") - "GL_LUMINANCE_ALPHA32F_ARB"("0x8819") - "GL_RGBA16F_ARB"("0x881A") - "GL_RGB16F_ARB"("0x881B") - "GL_ALPHA16F_ARB"("0x881C") - "GL_INTENSITY16F_ARB"("0x881D") - "GL_LUMINANCE16F_ARB"("0x881E") - "GL_LUMINANCE_ALPHA16F_ARB"("0x881F") - } - file("TextureGather", ARB, "GL_ARB_texture_gather") { - "GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB"("0x8E5E") - "GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB"("0x8E5F") - "GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB"("0x8F9F") - } - file("TextureMirroredRepeat", ARB, "GL_ARB_texture_mirrored_repeat") { - "GL_MIRRORED_REPEAT_ARB"("0x8370") - } - file("TextureRectangle", ARB, "GL_ARB_texture_rectangle") { - "GL_TEXTURE_RECTANGLE_ARB"("0x84F5") - "GL_TEXTURE_BINDING_RECTANGLE_ARB"("0x84F6") - "GL_PROXY_TEXTURE_RECTANGLE_ARB"("0x84F7") - "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB"("0x84F8") - } - file("TransformFeedbackOverflowQuery", ARB, "GL_ARB_transform_feedback_overflow_query") { - "GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB"("0x82EC") - "GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB"("0x82ED") - } + file( + "TextureCompressionBptc", ARB, "GL_ARB_texture_compression_bptc", + "GL_COMPRESSED_RGBA_BPTC_UNORM_ARB" to "0x8E8C", + "GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB" to "0x8E8D", + "GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB" to "0x8E8E", + "GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB" to "0x8E8F" + ) + file( + "TextureCubeMap", ARB, "GL_ARB_texture_cube_map", + "GL_NORMAL_MAP_ARB" to "0x8511", + "GL_REFLECTION_MAP_ARB" to "0x8512", + "GL_TEXTURE_CUBE_MAP_ARB" to "0x8513", + "GL_TEXTURE_BINDING_CUBE_MAP_ARB" to "0x8514", + "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB" to "0x8515", + "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB" to "0x8516", + "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB" to "0x8517", + "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB" to "0x8518", + "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB" to "0x8519", + "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB" to "0x851A", + "GL_PROXY_TEXTURE_CUBE_MAP_ARB" to "0x851B", + "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB" to "0x851C" + ) + file( + "TextureCubeMapArray", ARB, "GL_ARB_texture_cube_map_array", + "GL_TEXTURE_CUBE_MAP_ARRAY_ARB" to "0x9009", + "GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB" to "0x900A", + "GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB" to "0x900B", + "GL_SAMPLER_CUBE_MAP_ARRAY_ARB" to "0x900C", + "GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB" to "0x900D", + "GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB" to "0x900E", + "GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB" to "0x900F" + ) + file( + "TextureEnvCombine", ARB, "GL_ARB_texture_env_combine", + "GL_COMBINE_ARB" to "0x8570", + "GL_COMBINE_RGB_ARB" to "0x8571", + "GL_COMBINE_ALPHA_ARB" to "0x8572", + "GL_SOURCE0_RGB_ARB" to "0x8580", + "GL_SOURCE1_RGB_ARB" to "0x8581", + "GL_SOURCE2_RGB_ARB" to "0x8582", + "GL_SOURCE0_ALPHA_ARB" to "0x8588", + "GL_SOURCE1_ALPHA_ARB" to "0x8589", + "GL_SOURCE2_ALPHA_ARB" to "0x858A", + "GL_OPERAND0_RGB_ARB" to "0x8590", + "GL_OPERAND1_RGB_ARB" to "0x8591", + "GL_OPERAND2_RGB_ARB" to "0x8592", + "GL_OPERAND0_ALPHA_ARB" to "0x8598", + "GL_OPERAND1_ALPHA_ARB" to "0x8599", + "GL_OPERAND2_ALPHA_ARB" to "0x859A", + "GL_RGB_SCALE_ARB" to "0x8573", + "GL_ADD_SIGNED_ARB" to "0x8574", + "GL_INTERPOLATE_ARB" to "0x8575", + "GL_SUBTRACT_ARB" to "0x84E7", + "GL_CONSTANT_ARB" to "0x8576", + "GL_PRIMARY_COLOR_ARB" to "0x8577", + "GL_PREVIOUS_ARB" to "0x8578" + ) + file( + "TextureEnvDot3", ARB, "GL_ARB_texture_env_dot3", + "GL_DOT3_RGB_ARB" to "0x86AE", + "GL_DOT3_RGBA_ARB" to "0x86AF" + ) + file( + "TextureFilterMinmax", ARB, "GL_ARB_texture_filter_minmax", + "GL_TEXTURE_REDUCTION_MODE_ARB" to "0x9366", + "GL_WEIGHTED_AVERAGE_ARB" to "0x9367" + ) + file( + "TextureFloat", ARB, "GL_ARB_texture_float", + "GL_TEXTURE_RED_TYPE_ARB" to "0x8C10", + "GL_TEXTURE_GREEN_TYPE_ARB" to "0x8C11", + "GL_TEXTURE_BLUE_TYPE_ARB" to "0x8C12", + "GL_TEXTURE_ALPHA_TYPE_ARB" to "0x8C13", + "GL_TEXTURE_LUMINANCE_TYPE_ARB" to "0x8C14", + "GL_TEXTURE_INTENSITY_TYPE_ARB" to "0x8C15", + "GL_TEXTURE_DEPTH_TYPE_ARB" to "0x8C16", + "GL_UNSIGNED_NORMALIZED_ARB" to "0x8C17", + "GL_RGBA32F_ARB" to "0x8814", + "GL_RGB32F_ARB" to "0x8815", + "GL_ALPHA32F_ARB" to "0x8816", + "GL_INTENSITY32F_ARB" to "0x8817", + "GL_LUMINANCE32F_ARB" to "0x8818", + "GL_LUMINANCE_ALPHA32F_ARB" to "0x8819", + "GL_RGBA16F_ARB" to "0x881A", + "GL_RGB16F_ARB" to "0x881B", + "GL_ALPHA16F_ARB" to "0x881C", + "GL_INTENSITY16F_ARB" to "0x881D", + "GL_LUMINANCE16F_ARB" to "0x881E", + "GL_LUMINANCE_ALPHA16F_ARB" to "0x881F" + ) + file( + "TextureGather", ARB, "GL_ARB_texture_gather", + "GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB" to "0x8E5E", + "GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB" to "0x8E5F", + "GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB" to "0x8F9F" + ) + file( + "TextureMirroredRepeat", ARB, "GL_ARB_texture_mirrored_repeat", + "GL_MIRRORED_REPEAT_ARB" to "0x8370" + ) + file( + "TextureRectangle", ARB, "GL_ARB_texture_rectangle", + "GL_TEXTURE_RECTANGLE_ARB" to "0x84F5", + "GL_TEXTURE_BINDING_RECTANGLE_ARB" to "0x84F6", + "GL_PROXY_TEXTURE_RECTANGLE_ARB" to "0x84F7", + "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB" to "0x84F8" + ) + file( + "TransformFeedbackOverflowQuery", ARB, "GL_ARB_transform_feedback_overflow_query", + "GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB" to "0x82EC", + "GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB" to "0x82ED" + ) file("TransposeMatrix", ARB, "GL_ARB_transpose_matrix") { "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB"("0x84E3") "GL_TRANSPOSE_PROJECTION_MATRIX_ARB"("0x84E4") @@ -840,66 +990,695 @@ fun khr() { "GL_HSL_LUMINOSITY_KHR"("0x92B0") "glBlendBarrierKHR"(void) } - file("BlendEquationAdvancedCoherent", KHR, "GL_KHR_blend_equation_advanced_coherent") { - "GL_BLEND_ADVANCED_COHERENT_KHR"("0x9285") - } - file("NoError", KHR, "GL_KHR_no_error") { - "GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR"("0x00000008") - } + file( + "BlendEquationAdvancedCoherent", KHR, "GL_KHR_blend_equation_advanced_coherent", + "GL_BLEND_ADVANCED_COHERENT_KHR" to "0x9285" + ) + file( + "NoError", KHR, "GL_KHR_no_error", + "GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR" to "0x00000008" + ) file("ParallelShaderCompile", KHR, "GL_KHR_parallel_shader_compile") { "GL_MAX_SHADER_COMPILER_THREADS_KHR"("0x91B0") "GL_COMPLETION_STATUS_KHR"("0x91B1") "glMaxShaderCompilerThreadsKHR"(void, GLuint("count")) } - file("Robustness", KHR, "GL_KHR_robustness") { - "GL_CONTEXT_ROBUST_ACCESS"("0x90F3") + file( + "Robustness", KHR, "GL_KHR_robustness", + "GL_CONTEXT_ROBUST_ACCESS" to "0x90F3" + ) + file( + "ShaderSubgroup", KHR, "GL_KHR_shader_subgroup", + "GL_SUBGROUP_SIZE_KHR" to "0x9532", + "GL_SUBGROUP_SUPPORTED_STAGES_KHR" to "0x9533", + "GL_SUBGROUP_SUPPORTED_FEATURES_KHR" to "0x9534", + "GL_SUBGROUP_QUAD_ALL_STAGES_KHR" to "0x9535", + "GL_SUBGROUP_FEATURE_BASIC_BIT_KHR" to "0x00000001", + "GL_SUBGROUP_FEATURE_VOTE_BIT_KHR" to "0x00000002", + "GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR" to "0x00000004", + "GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR" to "0x00000008", + "GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR" to "0x00000010", + "GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR" to "0x00000020", + "GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR" to "0x00000040", + "GL_SUBGROUP_FEATURE_QUAD_BIT_KHR" to "0x00000080" + ) + file( + "TextureCompressionAstcHdr", KHR, "GL_KHR_texture_compression_astc_hdr", + "GL_COMPRESSED_RGBA_ASTC_4x4_KHR" to "0x93B0", + "GL_COMPRESSED_RGBA_ASTC_5x4_KHR" to "0x93B1", + "GL_COMPRESSED_RGBA_ASTC_5x5_KHR" to "0x93B2", + "GL_COMPRESSED_RGBA_ASTC_6x5_KHR" to "0x93B3", + "GL_COMPRESSED_RGBA_ASTC_6x6_KHR" to "0x93B4", + "GL_COMPRESSED_RGBA_ASTC_8x5_KHR" to "0x93B5", + "GL_COMPRESSED_RGBA_ASTC_8x6_KHR" to "0x93B6", + "GL_COMPRESSED_RGBA_ASTC_8x8_KHR" to "0x93B7", + "GL_COMPRESSED_RGBA_ASTC_10x5_KHR" to "0x93B8", + "GL_COMPRESSED_RGBA_ASTC_10x6_KHR" to "0x93B9", + "GL_COMPRESSED_RGBA_ASTC_10x8_KHR" to "0x93BA", + "GL_COMPRESSED_RGBA_ASTC_10x10_KHR" to "0x93BB", + "GL_COMPRESSED_RGBA_ASTC_12x10_KHR" to "0x93BC", + "GL_COMPRESSED_RGBA_ASTC_12x12_KHR" to "0x93BD", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR" to "0x93D0", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR" to "0x93D1", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR" to "0x93D2", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR" to "0x93D3", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR" to "0x93D4", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR" to "0x93D5", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR" to "0x93D6", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR" to "0x93D7", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR" to "0x93D8", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR" to "0x93D9", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR" to "0x93DA", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR" to "0x93DB", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR" to "0x93DC", + "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR" to "0x93DD" + ) +} + +fun oes() { +} + +fun `3dfx`() { + file( + "Multisample", `3DFX`, "GL_3DFX_multisample", + "GL_MULTISAMPLE_3DFX" to "0x86B2", + "GL_SAMPLE_BUFFERS_3DFX" to "0x86B3", + "GL_SAMPLES_3DFX" to "0x86B4", + "GL_MULTISAMPLE_BIT_3DFX" to "0x20000000" + ) + file("Tbuffer", `3DFX`, "GL_3DFX_tbuffer") { + "glTbufferMask3DFX"(void, GLuint("mask")) + } + file( + "TextureCompressionFXT1", `3DFX`, "GL_3DFX_texture_compression_FXT1", + "GL_COMPRESSED_RGB_FXT1_3DFX" to "0x86B0", + "GL_COMPRESSED_RGBA_FXT1_3DFX" to "0x86B1" + ) +} + +fun amd() {} + +fun apple() {} + +fun ati() {} + +fun ext() {} + +fun gremedy() {} + +fun hp() {} + +fun ibm() {} + +fun ingr() {} + +fun intel() {} + +fun mesa() {} + +fun nv() {} + +fun oml() {} + +fun ovr() {} + +fun pgi() {} + +fun rend() {} + +fun s3() {} + +fun sgi() {} + +fun sun() { + file("ConstantData", SUNX, "GL_SUNX_constant_data") { + "GL_UNPACK_CONSTANT_DATA_SUNX"("0x81D5") + "GL_TEXTURE_CONSTANT_DATA_SUNX"("0x81D6") + "glFinishTextureSUNX"(void) + } + file( + "ConvolutionBorderModes", SUN, "GL_SUN_convolution_border_modes", + "GL_WRAP_BORDER_SUN" to "0x81D4" + ) + file("GlobalAlpha", SUN, "GL_SUN_global_alpha") { + "GL_GLOBAL_ALPHA_SUN"("0x81D9") + "GL_GLOBAL_ALPHA_FACTOR_SUN"("0x81DA") + "glGlobalAlphaFactorbSUN"(void, GLbyte("factor")) + "glGlobalAlphaFactorsSUN"(void, GLshort("factor")) + "glGlobalAlphaFactoriSUN"(void, GLint("factor")) + "glGlobalAlphaFactorfSUN"(void, GLfloat("factor")) + "glGlobalAlphaFactordSUN"(void, GLdouble("factor")) + "glGlobalAlphaFactorubSUN"(void, GLubyte("factor")) + "glGlobalAlphaFactorusSUN"(void, GLushort("factor")) + "glGlobalAlphaFactoruiSUN"(void, GLuint("factor")) } - file("ShaderSubgroup", KHR, "GL_KHR_shader_subgroup") { - "GL_SUBGROUP_SIZE_KHR"("0x9532") - "GL_SUBGROUP_SUPPORTED_STAGES_KHR"("0x9533") - "GL_SUBGROUP_SUPPORTED_FEATURES_KHR"("0x9534") - "GL_SUBGROUP_QUAD_ALL_STAGES_KHR"("0x9535") - "GL_SUBGROUP_FEATURE_BASIC_BIT_KHR"("0x00000001") - "GL_SUBGROUP_FEATURE_VOTE_BIT_KHR"("0x00000002") - "GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR"("0x00000004") - "GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR"("0x00000008") - "GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR"("0x00000010") - "GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR"("0x00000020") - "GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR"("0x00000040") - "GL_SUBGROUP_FEATURE_QUAD_BIT_KHR"("0x00000080") + file("MeshArray", SUN, "GL_SUN_mesh_array") { + "GL_QUAD_MESH_SUN"("0x8614") + "GL_TRIANGLE_MESH_SUN"("0x8615") + "glDrawMeshArraysSUN"(void, GLenum("mode"), GLint("first"), GLsizei("count"), GLsizei("width")) } - file("TextureCompressionAstcHdr", KHR, "GL_KHR_texture_compression_astc_hdr") { - "GL_COMPRESSED_RGBA_ASTC_4x4_KHR"("0x93B0") - "GL_COMPRESSED_RGBA_ASTC_5x4_KHR"("0x93B1") - "GL_COMPRESSED_RGBA_ASTC_5x5_KHR"("0x93B2") - "GL_COMPRESSED_RGBA_ASTC_6x5_KHR"("0x93B3") - "GL_COMPRESSED_RGBA_ASTC_6x6_KHR"("0x93B4") - "GL_COMPRESSED_RGBA_ASTC_8x5_KHR"("0x93B5") - "GL_COMPRESSED_RGBA_ASTC_8x6_KHR"("0x93B6") - "GL_COMPRESSED_RGBA_ASTC_8x8_KHR"("0x93B7") - "GL_COMPRESSED_RGBA_ASTC_10x5_KHR"("0x93B8") - "GL_COMPRESSED_RGBA_ASTC_10x6_KHR"("0x93B9") - "GL_COMPRESSED_RGBA_ASTC_10x8_KHR"("0x93BA") - "GL_COMPRESSED_RGBA_ASTC_10x10_KHR"("0x93BB") - "GL_COMPRESSED_RGBA_ASTC_12x10_KHR"("0x93BC") - "GL_COMPRESSED_RGBA_ASTC_12x12_KHR"("0x93BD") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"("0x93D0") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"("0x93D1") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"("0x93D2") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"("0x93D3") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"("0x93D4") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"("0x93D5") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"("0x93D6") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"("0x93D7") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"("0x93D8") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"("0x93D9") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"("0x93DA") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"("0x93DB") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"("0x93DC") - "GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"("0x93DD") + file( + "SliceAccum", SUN, "GL_SUN_slice_accum", + "GL_SLICE_ACCUM_SUN" to "0x85CC" + ) + file("TriangleList", SUN, "GL_SUN_triangle_list") { + "GL_RESTART_SUN"("0x0001") + "GL_REPLACE_MIDDLE_SUN"("0x0002") + "GL_REPLACE_OLDEST_SUN"("0x0003") + "GL_TRIANGLE_LIST_SUN"("0x81D7") + "GL_REPLACEMENT_CODE_SUN"("0x81D8") + "GL_REPLACEMENT_CODE_ARRAY_SUN"("0x85C0") + "GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN"("0x85C1") + "GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN"("0x85C2") + "GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN"("0x85C3") + "GL_R1UI_V3F_SUN"("0x85C4") + "GL_R1UI_C4UB_V3F_SUN"("0x85C5") + "GL_R1UI_C3F_V3F_SUN"("0x85C6") + "GL_R1UI_N3F_V3F_SUN"("0x85C7") + "GL_R1UI_C4F_N3F_V3F_SUN"("0x85C8") + "GL_R1UI_T2F_V3F_SUN"("0x85C9") + "GL_R1UI_T2F_N3F_V3F_SUN"("0x85CA") + "GL_R1UI_T2F_C4F_N3F_V3F_SUN"("0x85CB") + "glReplacementCodeuiSUN"(void, GLuint("code")) + "glReplacementCodeusSUN"(void, GLushort("code")) + "glReplacementCodeubSUN"(void, GLubyte("code")) + "glReplacementCodeuivSUN"(void, address("code", "const GLuint *")) + "glReplacementCodeusvSUN"(void, address("code", "const GLushort *")) + "glReplacementCodeubvSUN"(void, address("code", "const GLubyte *")) + "glReplacementCodePointerSUN"(void, GLenum("type"), GLsizei("stride"), address("pointer", "const void **")) + } + file("Vertex", SUN, "GL_SUN_vertex") { + "glColor4ubVertex2fSUN"( + void, + GLubyte("r"), + GLubyte("g"), + GLubyte("b"), + GLubyte("a"), + GLfloat("x"), + GLfloat("y") + ) + "glColor4ubVertex2fvSUN"(void, address("c", "const GLubyte *"), address("v", "const GLfloat *")) + "glColor4ubVertex3fSUN"( + void, + GLubyte("r"), + GLubyte("g"), + GLubyte("b"), + GLubyte("a"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glColor4ubVertex3fvSUN"(void, address("c", "const GLubyte *"), address("v", "const GLfloat *")) + "glColor3fVertex3fSUN"(void, GLfloat("r"), GLfloat("g"), GLfloat("b"), GLfloat("x"), GLfloat("y"), GLfloat("z")) + "glColor3fVertex3fvSUN"(void, address("c", "const GLfloat *"), address("v", "const GLfloat *")) + "glNormal3fVertex3fSUN"( + void, + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glNormal3fVertex3fvSUN"(void, address("n", "const GLfloat *"), address("v", "const GLfloat *")) + "glColor4fNormal3fVertex3fSUN"( + void, + GLfloat("r"), + GLfloat("g"), + GLfloat("b"), + GLfloat("a"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glColor4fNormal3fVertex3fvSUN"( + void, + address("c", "const GLfloat *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glTexCoord2fVertex3fSUN"(void, GLfloat("s"), GLfloat("t"), GLfloat("x"), GLfloat("y"), GLfloat("z")) + "glTexCoord2fVertex3fvSUN"(void, address("tc", "const GLfloat *"), address("v", "const GLfloat *")) + "glTexCoord4fVertex4fSUN"( + void, + GLfloat("s"), + GLfloat("t"), + GLfloat("p"), + GLfloat("q"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z"), + GLfloat("w") + ) + "glTexCoord4fVertex4fvSUN"(void, address("tc", "const GLfloat *"), address("v", "const GLfloat *")) + "glTexCoord2fColor4ubVertex3fSUN"( + void, + GLfloat("s"), + GLfloat("t"), + GLubyte("r"), + GLubyte("g"), + GLubyte("b"), + GLubyte("a"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glTexCoord2fColor4ubVertex3fvSUN"( + void, + address("tc", "const GLfloat *"), + address("c", "const GLubyte *"), + address("v", "const GLfloat *") + ) + "glTexCoord2fColor3fVertex3fSUN"( + void, + GLfloat("s"), + GLfloat("t"), + GLfloat("r"), + GLfloat("g"), + GLfloat("b"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glTexCoord2fColor3fVertex3fvSUN"( + void, + address("tc", "const GLfloat *"), + address("c", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glTexCoord2fNormal3fVertex3fSUN"( + void, + GLfloat("s"), + GLfloat("t"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glTexCoord2fNormal3fVertex3fvSUN"( + void, + address("tc", "const GLfloat *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glTexCoord2fColor4fNormal3fVertex3fSUN"( + void, + GLfloat("s"), + GLfloat("t"), + GLfloat("r"), + GLfloat("g"), + GLfloat("b"), + GLfloat("a"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glTexCoord2fColor4fNormal3fVertex3fvSUN"( + void, + address("tc", "const GLfloat *"), + address("c", "const GLfloat *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glTexCoord4fColor4fNormal3fVertex4fSUN"( + void, + GLfloat("s"), + GLfloat("t"), + GLfloat("p"), + GLfloat("q"), + GLfloat("r"), + GLfloat("g"), + GLfloat("b"), + GLfloat("a"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z"), + GLfloat("w") + ) + "glTexCoord4fColor4fNormal3fVertex4fvSUN"( + void, + address("tc", "const GLfloat *"), + address("c", "const GLfloat *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glReplacementCodeuiVertex3fSUN"(void, GLuint("rc"), GLfloat("x"), GLfloat("y"), GLfloat("z")) + "glReplacementCodeuiVertex3fvSUN"(void, address("rc", "const GLuint *"), address("v", "const GLfloat *")) + "glReplacementCodeuiColor4ubVertex3fSUN"( + void, + GLuint("rc"), + GLubyte("r"), + GLubyte("g"), + GLubyte("b"), + GLubyte("a"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glReplacementCodeuiColor4ubVertex3fvSUN"( + void, + address("rc", "const GLuint *"), + address("c", "const GLubyte *"), + address("v", "const GLfloat *") + ) + "glReplacementCodeuiColor3fVertex3fSUN"( + void, + GLuint("rc"), + GLfloat("r"), + GLfloat("g"), + GLfloat("b"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glReplacementCodeuiColor3fVertex3fvSUN"( + void, + address("rc", "const GLuint *"), + address("c", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glReplacementCodeuiNormal3fVertex3fSUN"( + void, + GLuint("rc"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glReplacementCodeuiNormal3fVertex3fvSUN"( + void, + address("rc", "const GLuint *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glReplacementCodeuiColor4fNormal3fVertex3fSUN"( + void, + GLuint("rc"), + GLfloat("r"), + GLfloat("g"), + GLfloat("b"), + GLfloat("a"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glReplacementCodeuiColor4fNormal3fVertex3fvSUN"( + void, + address("rc", "const GLuint *"), + address("c", "const GLfloat *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glReplacementCodeuiTexCoord2fVertex3fSUN"( + void, + GLuint("rc"), + GLfloat("s"), + GLfloat("t"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glReplacementCodeuiTexCoord2fVertex3fvSUN"( + void, + address("rc", "const GLuint *"), + address("tc", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN"( + void, + GLuint("rc"), + GLfloat("s"), + GLfloat("t"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN"( + void, + address("rc", "const GLuint *"), + address("tc", "const GLfloat *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) + "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN"( + void, + GLuint("rc"), + GLfloat("s"), + GLfloat("t"), + GLfloat("r"), + GLfloat("g"), + GLfloat("b"), + GLfloat("a"), + GLfloat("nx"), + GLfloat("ny"), + GLfloat("nz"), + GLfloat("x"), + GLfloat("y"), + GLfloat("z") + ) + "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN"( + void, + address("rc", "const GLuint *"), + address("tc", "const GLfloat *"), + address("c", "const GLfloat *"), + address("n", "const GLfloat *"), + address("v", "const GLfloat *") + ) } } +fun win() { + file( + "PhongShading", WIN, "GL_WIN_phong_shading", + "GL_PHONG_WIN" to "0x80EA", + "GL_PHONG_HINT_WIN" to "0x80EB" + ) + file( + "SpecularFog", WIN, "GL_WIN_specular_fog", + "GL_FOG_SPECULAR_TEXTURE_WIN" to "0x80EC" + ) +} + +fun glExtCaps() { + Files.writeString(Path("GLExtCaps.java"), buildString { + appendLine( + """ + $fileHeader + package overrungl.opengl; + + import overrungl.opengl.ext.*; + import overrungl.opengl.ext.arb.*; + import overrungl.opengl.ext.khr.*; + import overrungl.opengl.ext.amd.*; + import overrungl.opengl.ext.apple.*; + import overrungl.opengl.ext.sun.*; + + import java.lang.invoke.MethodHandle; + + /** + * The OpenGL extension capabilities. + * + * @since 0.1.0 + */ + public final class GLExtCaps { + /** The OpenGL extension flags. */ + public boolean GL_3DFX_multisample, GL_3DFX_tbuffer, GL_3DFX_texture_compression_FXT1, GL_AMD_blend_minmax_factor, + GL_AMD_conservative_depth, GL_AMD_debug_output, GL_AMD_depth_clamp_separate, GL_AMD_draw_buffers_blend, + GL_AMD_framebuffer_multisample_advanced, GL_AMD_framebuffer_sample_positions, GL_AMD_gcn_shader, + GL_AMD_gpu_shader_half_float, GL_AMD_gpu_shader_int16, GL_AMD_gpu_shader_int64, GL_AMD_interleaved_elements, + GL_AMD_multi_draw_indirect, GL_AMD_name_gen_delete, GL_AMD_occlusion_query_event, GL_AMD_performance_monitor, + GL_AMD_pinned_memory, GL_AMD_query_buffer_object, GL_AMD_sample_positions, GL_AMD_seamless_cubemap_per_texture, + GL_AMD_shader_atomic_counter_ops, GL_AMD_shader_ballot, GL_AMD_shader_explicit_vertex_parameter, + GL_AMD_shader_gpu_shader_half_float_fetch, GL_AMD_shader_image_load_store_lod, GL_AMD_shader_stencil_export, + GL_AMD_shader_trinary_minmax, GL_AMD_sparse_texture, GL_AMD_stencil_operation_extended, + GL_AMD_texture_gather_bias_lod, GL_AMD_texture_texture4, GL_AMD_transform_feedback3_lines_triangles, + GL_AMD_transform_feedback4, GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_tessellator, + GL_AMD_vertex_shader_viewport_index, GL_APPLE_aux_depth_stencil, GL_APPLE_client_storage, GL_APPLE_element_array, + GL_APPLE_fence, GL_APPLE_float_pixels, GL_APPLE_flush_buffer_range, GL_APPLE_object_purgeable, GL_APPLE_rgb_422, + GL_APPLE_row_bytes, GL_APPLE_specular_vector, GL_APPLE_texture_range, GL_APPLE_transform_hint, + GL_APPLE_vertex_array_object, GL_APPLE_vertex_array_range, GL_APPLE_vertex_program_evaluators, GL_APPLE_ycbcr_422, + GL_ARB_ES2_compatibility, GL_ARB_ES3_1_compatibility, GL_ARB_ES3_2_compatibility, GL_ARB_ES3_compatibility, + GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_bindless_texture, GL_ARB_blend_func_extended, + GL_ARB_buffer_storage, GL_ARB_cl_event, GL_ARB_clear_buffer_object, GL_ARB_clear_texture, GL_ARB_clip_control, + GL_ARB_color_buffer_float, GL_ARB_compatibility, GL_ARB_compressed_texture_pixel_storage, GL_ARB_compute_shader, + GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, GL_ARB_copy_buffer, + GL_ARB_copy_image, GL_ARB_cull_distance, GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, + GL_ARB_depth_texture, GL_ARB_derivative_control, GL_ARB_direct_state_access, GL_ARB_draw_buffers, + GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect, GL_ARB_draw_instanced, + GL_ARB_enhanced_layouts, GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location, + GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport, GL_ARB_fragment_program, + GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader, GL_ARB_fragment_shader_interlock, + GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object, GL_ARB_framebuffer_sRGB, GL_ARB_geometry_shader4, + GL_ARB_get_program_binary, GL_ARB_get_texture_sub_image, GL_ARB_gl_spirv, GL_ARB_gpu_shader5, GL_ARB_gpu_shader_fp64, + GL_ARB_gpu_shader_int64, GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, GL_ARB_imaging, GL_ARB_indirect_parameters, + GL_ARB_instanced_arrays, GL_ARB_internalformat_query, GL_ARB_internalformat_query2, GL_ARB_invalidate_subdata, + GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, GL_ARB_matrix_palette, GL_ARB_multi_bind, + GL_ARB_multi_draw_indirect, GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_occlusion_query2, + GL_ARB_parallel_shader_compile, GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, + GL_ARB_point_sprite, GL_ARB_polygon_offset_clamp, GL_ARB_post_depth_coverage, GL_ARB_program_interface_query, + GL_ARB_provoking_vertex, GL_ARB_query_buffer_object, GL_ARB_robust_buffer_access_behavior, GL_ARB_robustness, + GL_ARB_robustness_isolation, GL_ARB_sample_locations, GL_ARB_sample_shading, GL_ARB_sampler_objects, + GL_ARB_seamless_cube_map, GL_ARB_seamless_cubemap_per_texture, GL_ARB_separate_shader_objects, + GL_ARB_shader_atomic_counter_ops, GL_ARB_shader_atomic_counters, GL_ARB_shader_ballot, GL_ARB_shader_bit_encoding, + GL_ARB_shader_clock, GL_ARB_shader_draw_parameters, GL_ARB_shader_group_vote, GL_ARB_shader_image_load_store, + GL_ARB_shader_image_size, GL_ARB_shader_objects, GL_ARB_shader_precision, GL_ARB_shader_stencil_export, + GL_ARB_shader_storage_buffer_object, GL_ARB_shader_subroutine, GL_ARB_shader_texture_image_samples, + GL_ARB_shader_texture_lod, GL_ARB_shader_viewport_layer_array, GL_ARB_shading_language_100, + GL_ARB_shading_language_420pack, GL_ARB_shading_language_include, GL_ARB_shading_language_packing, GL_ARB_shadow, + GL_ARB_shadow_ambient, GL_ARB_sparse_buffer, GL_ARB_sparse_texture, GL_ARB_sparse_texture2, GL_ARB_sparse_texture_clamp, + GL_ARB_spirv_extensions, GL_ARB_stencil_texturing, GL_ARB_sync, GL_ARB_tessellation_shader, GL_ARB_texture_barrier, + GL_ARB_texture_border_clamp, GL_ARB_texture_buffer_object, GL_ARB_texture_buffer_object_rgb32, GL_ARB_texture_buffer_range, + GL_ARB_texture_compression, GL_ARB_texture_compression_bptc, GL_ARB_texture_compression_rgtc, + GL_ARB_texture_cube_map, GL_ARB_texture_cube_map_array, GL_ARB_texture_env_add, GL_ARB_texture_env_combine, + GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, GL_ARB_texture_filter_anisotropic, GL_ARB_texture_filter_minmax, + GL_ARB_texture_float, GL_ARB_texture_gather, GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_mirrored_repeat, + GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two, GL_ARB_texture_query_levels, GL_ARB_texture_query_lod, + GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_stencil8, GL_ARB_texture_storage, + GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle, GL_ARB_texture_view, GL_ARB_timer_query, + GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced, + GL_ARB_transform_feedback_overflow_query, GL_ARB_transpose_matrix, GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra, + GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_64bit, GL_ARB_vertex_attrib_binding, GL_ARB_vertex_blend, + GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_vertex_type_10f_11f_11f_rev, + GL_ARB_vertex_type_2_10_10_10_rev, GL_ARB_viewport_array, GL_ARB_window_pos, GL_ATI_draw_buffers, GL_ATI_element_array, + GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader, GL_ATI_map_object_buffer, GL_ATI_meminfo, GL_ATI_pixel_format_float, + GL_ATI_pn_triangles, GL_ATI_separate_stencil, GL_ATI_text_fragment_shader, GL_ATI_texture_env_combine3, GL_ATI_texture_float, + GL_ATI_texture_mirror_once, GL_ATI_vertex_array_object, GL_ATI_vertex_attrib_array_object, GL_ATI_vertex_streams, + GL_EXT_422_pixels, GL_EXT_EGL_image_storage, GL_EXT_EGL_sync, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_bindable_uniform, + GL_EXT_blend_color, GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, GL_EXT_blend_logic_op, GL_EXT_blend_minmax, + GL_EXT_blend_subtract, GL_EXT_clip_volume_hint, GL_EXT_cmyka, GL_EXT_color_subtable, GL_EXT_compiled_vertex_array, + GL_EXT_convolution, GL_EXT_coordinate_frame, GL_EXT_copy_texture, GL_EXT_cull_vertex, GL_EXT_debug_label, GL_EXT_debug_marker, + GL_EXT_depth_bounds_test, GL_EXT_direct_state_access, GL_EXT_draw_buffers2, GL_EXT_draw_instanced, GL_EXT_draw_range_elements, + GL_EXT_external_buffer, GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, + GL_EXT_framebuffer_multisample_blit_scaled, GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, GL_EXT_geometry_shader4, + GL_EXT_gpu_program_parameters, GL_EXT_gpu_shader4, GL_EXT_histogram, GL_EXT_index_array_formats, GL_EXT_index_func, + GL_EXT_index_material, GL_EXT_index_texture, GL_EXT_light_texture, GL_EXT_memory_object, GL_EXT_memory_object_fd, + GL_EXT_memory_object_win32, GL_EXT_misc_attribute, GL_EXT_multi_draw_arrays, GL_EXT_multisample, + GL_EXT_multiview_tessellation_geometry_shader, GL_EXT_multiview_texture_multisample, GL_EXT_multiview_timer_query, + GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_packed_pixels, GL_EXT_paletted_texture, + GL_EXT_pixel_buffer_object, GL_EXT_pixel_transform, GL_EXT_pixel_transform_color_table, GL_EXT_point_parameters, + GL_EXT_polygon_offset, GL_EXT_polygon_offset_clamp, GL_EXT_post_depth_coverage, GL_EXT_provoking_vertex, + GL_EXT_raster_multisample, GL_EXT_rescale_normal, GL_EXT_secondary_color, GL_EXT_semaphore, GL_EXT_semaphore_fd, + GL_EXT_semaphore_win32, GL_EXT_separate_shader_objects, GL_EXT_separate_specular_color, GL_EXT_shader_framebuffer_fetch, + GL_EXT_shader_framebuffer_fetch_non_coherent, GL_EXT_shader_image_load_formatted, GL_EXT_shader_image_load_store, + GL_EXT_shader_integer_mix, GL_EXT_shadow_funcs, GL_EXT_shared_texture_palette, GL_EXT_sparse_texture2, + GL_EXT_stencil_clear_tag, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_subtexture, GL_EXT_texture, + GL_EXT_texture3D, GL_EXT_texture_array, GL_EXT_texture_buffer_object, GL_EXT_texture_compression_latc, + GL_EXT_texture_compression_rgtc, GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map, GL_EXT_texture_env_add, + GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, GL_EXT_texture_filter_minmax, + GL_EXT_texture_integer, GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, GL_EXT_texture_object, + GL_EXT_texture_perturb_normal, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_R8, GL_EXT_texture_sRGB_RG8, + GL_EXT_texture_sRGB_decode, GL_EXT_texture_shadow_lod, GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm, + GL_EXT_texture_storage, GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback, GL_EXT_vertex_array, + GL_EXT_vertex_array_bgra, GL_EXT_vertex_attrib_64bit, GL_EXT_vertex_shader, GL_EXT_vertex_weighting, + GL_EXT_win32_keyed_mutex, GL_EXT_window_rectangles, GL_EXT_x11_sync_object, GL_GREMEDY_frame_terminator, + GL_GREMEDY_string_marker, GL_HP_convolution_border_modes, GL_HP_image_transform, GL_HP_occlusion_test, + GL_HP_texture_lighting, GL_IBM_cull_vertex, GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip, GL_IBM_static_data, + GL_IBM_texture_mirrored_repeat, GL_IBM_vertex_array_lists, GL_INGR_blend_func_separate, GL_INGR_color_clamp, + GL_INGR_interlace_read, GL_INTEL_blackhole_render, GL_INTEL_conservative_rasterization, GL_INTEL_fragment_shader_ordering, + GL_INTEL_framebuffer_CMAA, GL_INTEL_map_texture, GL_INTEL_parallel_arrays, GL_INTEL_performance_query, + GL_KHR_blend_equation_advanced, GL_KHR_blend_equation_advanced_coherent, GL_KHR_context_flush_control, GL_KHR_debug, + GL_KHR_no_error, GL_KHR_parallel_shader_compile, GL_KHR_robust_buffer_access_behavior, GL_KHR_robustness, + GL_KHR_shader_subgroup, GL_KHR_texture_compression_astc_hdr, GL_KHR_texture_compression_astc_ldr, + GL_KHR_texture_compression_astc_sliced_3d, GL_MESAX_texture_stack, GL_MESA_framebuffer_flip_x, GL_MESA_framebuffer_flip_y, + GL_MESA_framebuffer_swap_xy, GL_MESA_pack_invert, GL_MESA_program_binary_formats, GL_MESA_resize_buffers, + GL_MESA_shader_integer_functions, GL_MESA_tile_raster_order, GL_MESA_window_pos, GL_MESA_ycbcr_texture, + GL_NVX_blend_equation_advanced_multi_draw_buffers, GL_NVX_conditional_render, GL_NVX_gpu_memory_info, + GL_NVX_gpu_multicast2, GL_NVX_linked_gpu_multicast, GL_NVX_progress_fence, GL_NV_alpha_to_coverage_dither_control, + GL_NV_bindless_multi_draw_indirect, GL_NV_bindless_multi_draw_indirect_count, GL_NV_bindless_texture, + GL_NV_blend_equation_advanced, GL_NV_blend_equation_advanced_coherent, GL_NV_blend_minmax_factor, GL_NV_blend_square, + GL_NV_clip_space_w_scaling, GL_NV_command_list, GL_NV_compute_program5, GL_NV_compute_shader_derivatives, + GL_NV_conditional_render, GL_NV_conservative_raster, GL_NV_conservative_raster_dilate, GL_NV_conservative_raster_pre_snap, + GL_NV_conservative_raster_pre_snap_triangles, GL_NV_conservative_raster_underestimation, GL_NV_copy_depth_to_color, + GL_NV_copy_image, GL_NV_deep_texture3D, GL_NV_depth_buffer_float, GL_NV_depth_clamp, GL_NV_draw_texture, + GL_NV_draw_vulkan_image, GL_NV_evaluators, GL_NV_explicit_multisample, GL_NV_fence, GL_NV_fill_rectangle, + GL_NV_float_buffer, GL_NV_fog_distance, GL_NV_fragment_coverage_to_color, GL_NV_fragment_program, GL_NV_fragment_program2, + GL_NV_fragment_program4, GL_NV_fragment_program_option, GL_NV_fragment_shader_barycentric, GL_NV_fragment_shader_interlock, + GL_NV_framebuffer_mixed_samples, GL_NV_framebuffer_multisample_coverage, GL_NV_geometry_program4, GL_NV_geometry_shader4, + GL_NV_geometry_shader_passthrough, GL_NV_gpu_multicast, GL_NV_gpu_program4, GL_NV_gpu_program5, + GL_NV_gpu_program5_mem_extended, GL_NV_gpu_shader5, GL_NV_half_float, GL_NV_internalformat_sample_query, + GL_NV_light_max_exponent, GL_NV_memory_attachment, GL_NV_memory_object_sparse, GL_NV_mesh_shader, + GL_NV_multisample_coverage, GL_NV_multisample_filter_hint, GL_NV_occlusion_query, GL_NV_packed_depth_stencil, + GL_NV_parameter_buffer_object, GL_NV_parameter_buffer_object2, GL_NV_path_rendering, GL_NV_path_rendering_shared_edge, + GL_NV_pixel_data_range, GL_NV_point_sprite, GL_NV_present_video, GL_NV_primitive_restart, GL_NV_primitive_shading_rate, + GL_NV_query_resource, GL_NV_query_resource_tag, GL_NV_register_combiners, GL_NV_register_combiners2, + GL_NV_representative_fragment_test, GL_NV_robustness_video_memory_purge, GL_NV_sample_locations, + GL_NV_sample_mask_override_coverage, GL_NV_scissor_exclusive, GL_NV_shader_atomic_counters, GL_NV_shader_atomic_float, + GL_NV_shader_atomic_float64, GL_NV_shader_atomic_fp16_vector, GL_NV_shader_atomic_int64, GL_NV_shader_buffer_load, + GL_NV_shader_buffer_store, GL_NV_shader_storage_buffer_object, GL_NV_shader_subgroup_partitioned, + GL_NV_shader_texture_footprint, GL_NV_shader_thread_group, GL_NV_shader_thread_shuffle, GL_NV_shading_rate_image, + GL_NV_stereo_view_rendering, GL_NV_tessellation_program5, GL_NV_texgen_emboss, GL_NV_texgen_reflection, + GL_NV_texture_barrier, GL_NV_texture_compression_vtc, GL_NV_texture_env_combine4, GL_NV_texture_expand_normal, + GL_NV_texture_multisample, GL_NV_texture_rectangle, GL_NV_texture_rectangle_compressed, GL_NV_texture_shader, + GL_NV_texture_shader2, GL_NV_texture_shader3, GL_NV_timeline_semaphore, GL_NV_transform_feedback, + GL_NV_transform_feedback2, GL_NV_uniform_buffer_unified_memory, GL_NV_vdpau_interop, GL_NV_vdpau_interop2, + GL_NV_vertex_array_range, GL_NV_vertex_array_range2, GL_NV_vertex_attrib_integer_64bit, GL_NV_vertex_buffer_unified_memory, + GL_NV_vertex_program, GL_NV_vertex_program1_1, GL_NV_vertex_program2, GL_NV_vertex_program2_option, GL_NV_vertex_program3, + GL_NV_vertex_program4, GL_NV_video_capture, GL_NV_viewport_array2, GL_NV_viewport_swizzle, GL_OES_byte_coordinates, + GL_OES_compressed_paletted_texture, GL_OES_fixed_point, GL_OES_query_matrix, GL_OES_read_format, GL_OES_single_precision, + GL_OML_interlace, GL_OML_resample, GL_OML_subsample, GL_OVR_multiview, GL_OVR_multiview2, GL_PGI_misc_hints, + GL_PGI_vertex_hints, GL_REND_screen_coordinates, GL_S3_s3tc, GL_SGIS_detail_texture, GL_SGIS_fog_function, + GL_SGIS_generate_mipmap, GL_SGIS_multisample, GL_SGIS_pixel_texture, GL_SGIS_point_line_texgen, GL_SGIS_point_parameters, + GL_SGIS_sharpen_texture, GL_SGIS_texture4D, GL_SGIS_texture_border_clamp, GL_SGIS_texture_color_mask, + GL_SGIS_texture_edge_clamp, GL_SGIS_texture_filter4, GL_SGIS_texture_lod, GL_SGIS_texture_select, GL_SGIX_async, + GL_SGIX_async_histogram, GL_SGIX_async_pixel, GL_SGIX_blend_alpha_minmax, GL_SGIX_calligraphic_fragment, GL_SGIX_clipmap, + GL_SGIX_convolution_accuracy, GL_SGIX_depth_pass_instrument, GL_SGIX_depth_texture, GL_SGIX_flush_raster, + GL_SGIX_fog_offset, GL_SGIX_fragment_lighting, GL_SGIX_framezoom, GL_SGIX_igloo_interface, GL_SGIX_instruments, + GL_SGIX_interlace, GL_SGIX_ir_instrument1, GL_SGIX_list_priority, GL_SGIX_pixel_texture, GL_SGIX_pixel_tiles, + GL_SGIX_polynomial_ffd, GL_SGIX_reference_plane, GL_SGIX_resample, GL_SGIX_scalebias_hint, GL_SGIX_shadow, + GL_SGIX_shadow_ambient, GL_SGIX_sprite, GL_SGIX_subsample, GL_SGIX_tag_sample_buffer, GL_SGIX_texture_add_env, + GL_SGIX_texture_coordinate_clamp, GL_SGIX_texture_lod_bias, GL_SGIX_texture_multi_buffer, GL_SGIX_texture_scale_bias, + GL_SGIX_vertex_preclip, GL_SGIX_ycrcb, GL_SGIX_ycrcb_subsample, GL_SGIX_ycrcba, GL_SGI_color_matrix, GL_SGI_color_table, + GL_SGI_texture_color_table, GL_SUNX_constant_data, GL_SUN_convolution_border_modes, GL_SUN_global_alpha, GL_SUN_mesh_array, + GL_SUN_slice_accum, GL_SUN_triangle_list, GL_SUN_vertex, GL_WIN_phong_shading, GL_WIN_specular_fog; + + /** GLCapabilities */ + public final GLCapabilities caps; + + /** + * Construct incomplete OpenGL extension capabilities. + * + * @param caps The parent capabilities. + */ + public GLExtCaps(GLCapabilities caps) { + this.caps = caps; + } + + /** Method handles. */ + public MethodHandle + """.trimIndent() + ) + generatedExtFunctions.forEachIndexed { index, function -> + if (index == 0) append(" ") + else append(", ") + append(function.name) + } + appendLine(";\n void load(GLLoadFunc load) {") + generatedExtClasses.forEach { + appendLine(" ${it.ext.extName}${it.name}.load(this, load);") + } + appendLine(" }\n}") + }) +} + /** * @author squid233 * @since 0.1.0 @@ -907,4 +1686,26 @@ fun khr() { fun main() { arb() khr() + oes() + `3dfx`() + amd() + apple() + ati() + ext() + gremedy() + hp() + ibm() + ingr() + intel() + mesa() + nv() + oml() + ovr() + pgi() + rend() + s3() + sgi() + sun() + win() + glExtCaps() }