Skip to content

Commit

Permalink
[OpenGL] Update extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 committed Dec 9, 2023
1 parent f927dbd commit 471be64
Show file tree
Hide file tree
Showing 35 changed files with 6,304 additions and 53 deletions.
2,176 changes: 2,176 additions & 0 deletions modules/overrungl.opengl/src/generator/kotlin/overrungl/opengl/GLEXT.kt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1199,16 +1199,6 @@ fun ati() {
}
}

fun ext() {
file(
"422Pixels", EXT, "GL_EXT_422_pixels",
"GL_422_EXT" to "0x80CC",
"GL_422_REV_EXT" to "0x80CD",
"GL_422_AVERAGE_EXT" to "0x80CE",
"GL_422_REV_AVERAGE_EXT" to "0x80CF"
)
}

fun gremedy() {
file("FrameTerminator", GREMEDY, "GL_GREMEDY_frame_terminator") {
"glFrameTerminatorGREMEDY"(void)
Expand Down
133 changes: 90 additions & 43 deletions modules/overrungl.opengl/src/main/java/overrungl/opengl/GLExtCaps.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_abgr}
*/
public final class GLEXTAbgr {
public static final int GL_ABGR_EXT = 0x8000;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_bgra}
*/
public final class GLEXTBgra {
public static final int GL_BGR_EXT = 0x80E0;
public static final int GL_BGRA_EXT = 0x80E1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_bindable_uniform}
*/
public final class GLEXTBindableUniform {
public static final int GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2;
public static final int GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3;
public static final int GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4;
public static final int GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED;
public static final int GL_UNIFORM_BUFFER_EXT = 0x8DEE;
public static final int GL_UNIFORM_BUFFER_BINDING_EXT = 0x8DEF;
public static void load(GLExtCaps ext, GLLoadFunc load) {
if (!ext.GL_EXT_bindable_uniform) return;
ext.glUniformBufferEXT = load.invoke("glUniformBufferEXT", ofVoid(JAVA_INT, JAVA_INT, JAVA_INT));
ext.glGetUniformBufferSizeEXT = load.invoke("glGetUniformBufferSizeEXT", of(JAVA_INT, JAVA_INT, JAVA_INT));
ext.glGetUniformOffsetEXT = load.invoke("glGetUniformOffsetEXT", of(JAVA_LONG, JAVA_INT, JAVA_INT));
}

public static void glUniformBufferEXT(int program, int location, int buffer) {
final var ext = getExtCapabilities();
try {
check(ext.glUniformBufferEXT).invokeExact(program, location, buffer);
} catch (Throwable e) { throw new AssertionError("should not reach here", e); }
}

public static int glGetUniformBufferSizeEXT(int program, int location) {
final var ext = getExtCapabilities();
try {
return (int)
check(ext.glGetUniformBufferSizeEXT).invokeExact(program, location);
} catch (Throwable e) { throw new AssertionError("should not reach here", e); }
}

public static long glGetUniformOffsetEXT(int program, int location) {
final var ext = getExtCapabilities();
try {
return (long)
check(ext.glGetUniformOffsetEXT).invokeExact(program, location);
} catch (Throwable e) { throw new AssertionError("should not reach here", e); }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_blend_color}
*/
public final class GLEXTBlendColor {
public static final int GL_CONSTANT_COLOR_EXT = 0x8001;
public static final int GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002;
public static final int GL_CONSTANT_ALPHA_EXT = 0x8003;
public static final int GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004;
public static final int GL_BLEND_COLOR_EXT = 0x8005;
public static void load(GLExtCaps ext, GLLoadFunc load) {
if (!ext.GL_EXT_blend_color) return;
ext.glBlendColorEXT = load.invoke("glBlendColorEXT", ofVoid(JAVA_FLOAT, JAVA_FLOAT, JAVA_FLOAT, JAVA_FLOAT));
}

public static void glBlendColorEXT(float red, float green, float blue, float alpha) {
final var ext = getExtCapabilities();
try {
check(ext.glBlendColorEXT).invokeExact(red, green, blue, alpha);
} catch (Throwable e) { throw new AssertionError("should not reach here", e); }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_blend_equation_separate}
*/
public final class GLEXTBlendEquationSeparate {
public static final int GL_BLEND_EQUATION_RGB_EXT = 0x8009;
public static final int GL_BLEND_EQUATION_ALPHA_EXT = 0x883D;
public static void load(GLExtCaps ext, GLLoadFunc load) {
if (!ext.GL_EXT_blend_equation_separate) return;
ext.glBlendEquationSeparateEXT = load.invoke("glBlendEquationSeparateEXT", ofVoid(JAVA_INT, JAVA_INT));
}

public static void glBlendEquationSeparateEXT(int modeRGB, int modeAlpha) {
final var ext = getExtCapabilities();
try {
check(ext.glBlendEquationSeparateEXT).invokeExact(modeRGB, modeAlpha);
} catch (Throwable e) { throw new AssertionError("should not reach here", e); }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_blend_func_separate}
*/
public final class GLEXTBlendFuncSeparate {
public static final int GL_BLEND_DST_RGB_EXT = 0x80C8;
public static final int GL_BLEND_SRC_RGB_EXT = 0x80C9;
public static final int GL_BLEND_DST_ALPHA_EXT = 0x80CA;
public static final int GL_BLEND_SRC_ALPHA_EXT = 0x80CB;
public static void load(GLExtCaps ext, GLLoadFunc load) {
if (!ext.GL_EXT_blend_func_separate) return;
ext.glBlendFuncSeparateEXT = load.invoke("glBlendFuncSeparateEXT", ofVoid(JAVA_INT, JAVA_INT, JAVA_INT, JAVA_INT));
}

public static void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) {
final var ext = getExtCapabilities();
try {
check(ext.glBlendFuncSeparateEXT).invokeExact(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
} catch (Throwable e) { throw new AssertionError("should not reach here", e); }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_blend_minmax}
*/
public final class GLEXTBlendMinmax {
public static final int GL_MIN_EXT = 0x8007;
public static final int GL_MAX_EXT = 0x8008;
public static final int GL_FUNC_ADD_EXT = 0x8006;
public static final int GL_BLEND_EQUATION_EXT = 0x8009;
public static void load(GLExtCaps ext, GLLoadFunc load) {
if (!ext.GL_EXT_blend_minmax) return;
ext.glBlendEquationEXT = load.invoke("glBlendEquationEXT", ofVoid(JAVA_INT));
}

public static void glBlendEquationEXT(int mode) {
final var ext = getExtCapabilities();
try {
check(ext.glBlendEquationEXT).invokeExact(mode);
} catch (Throwable e) { throw new AssertionError("should not reach here", e); }
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* MIT License
*
* Copyright (c) 2022-present 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!
package overrungl.opengl.ext.ext;

import overrungl.*;
import overrungl.opengl.*;
import java.lang.foreign.*;
import static java.lang.foreign.FunctionDescriptor.*;
import static java.lang.foreign.ValueLayout.*;
import static overrungl.opengl.GLLoader.*;

/**
* {@code GL_EXT_blend_subtract}
*/
public final class GLEXTBlendSubtract {
public static final int GL_FUNC_SUBTRACT_EXT = 0x800A;
public static final int GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B;
}
Loading

0 comments on commit 471be64

Please sign in to comment.