Skip to content

Commit

Permalink
Workaround[lwjgl]: force fetching all functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias-Boulay committed Nov 19, 2023
1 parent a43de35 commit 26f86f6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
Binary file modified jre_lwjgl3glfw/libs/lwjgl.jar
Binary file not shown.
54 changes: 27 additions & 27 deletions jre_lwjgl3glfw/src/main/java/org/lwjgl/opengl/GLCapabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -7512,7 +7512,7 @@ private static boolean check_GL11(FunctionProvider provider, PointerBuffer caps,
"glVertex2f", "glVertex2s", "glVertex2i", "glVertex2d", "glVertex2fv", "glVertex2sv", "glVertex2iv", "glVertex2dv", "glVertex3f", "glVertex3s",
"glVertex3i", "glVertex3d", "glVertex3fv", "glVertex3sv", "glVertex3iv", "glVertex3dv", "glVertex4f", "glVertex4s", "glVertex4i", "glVertex4d",
"glVertex4fv", "glVertex4sv", "glVertex4iv", "glVertex4dv", "glVertexPointer"
)) && checkFunctions(provider, caps, new int[] {
)) & checkFunctions(provider, caps, new int[] {
0, 1, 7, 9, 12, 14, 15, 17, 51, 55, 57, 58, 59, flag0 + 60, 61, 62, 63, flag0 + 68, 83, 84, 89, 91, 92, 94, 95, 96, 97, 98, 109, 111, 117, 118, 119,
120, 121, 122, 137, 139, 149, 155, 190, 191, 195, 196, 197, 232, 233, 247, 250, 251, 252, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 335
Expand All @@ -7525,7 +7525,7 @@ private static boolean check_GL11(FunctionProvider provider, PointerBuffer caps,
"glPolygonMode", "glPolygonOffset", "glReadBuffer", "glReadPixels", "glScissor", "glStencilFunc", "glStencilMask", "glStencilOp", "glTexImage1D",
"glTexImage2D", "glCopyTexImage1D", "glCopyTexImage2D", "glCopyTexSubImage1D", "glCopyTexSubImage2D", "glTexParameteri", "glTexParameteriv",
"glTexParameterf", "glTexParameterfv", "glTexSubImage1D", "glTexSubImage2D", "glViewport"
) && ext.contains("OpenGL11")) || reportMissing("GL", "OpenGL11");
) & ext.contains("OpenGL11")) || reportMissing("GL", "OpenGL11");
}

private static boolean check_GL12(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand All @@ -7534,7 +7534,7 @@ private static boolean check_GL12(FunctionProvider provider, PointerBuffer caps,
336, 337, 338, 339
},
"glTexImage3D", "glTexSubImage3D", "glCopyTexSubImage3D", "glDrawRangeElements"
) && ext.contains("OpenGL12")) || reportMissing("GL", "OpenGL12");
) & ext.contains("OpenGL12")) || reportMissing("GL", "OpenGL12");
}

private static boolean check_GL13(FunctionProvider provider, PointerBuffer caps, Set<String> ext, boolean fc) {
Expand All @@ -7550,12 +7550,12 @@ private static boolean check_GL13(FunctionProvider provider, PointerBuffer caps,
"glMultiTexCoord3dv", "glMultiTexCoord4f", "glMultiTexCoord4s", "glMultiTexCoord4i", "glMultiTexCoord4d", "glMultiTexCoord4fv",
"glMultiTexCoord4sv", "glMultiTexCoord4iv", "glMultiTexCoord4dv", "glLoadTransposeMatrixf", "glLoadTransposeMatrixd", "glMultTransposeMatrixf",
"glMultTransposeMatrixd"
)) && checkFunctions(provider, caps, new int[] {
)) & checkFunctions(provider, caps, new int[] {
340, 341, 342, 343, 344, 345, 346, 347, 348
},
"glCompressedTexImage3D", "glCompressedTexImage2D", "glCompressedTexImage1D", "glCompressedTexSubImage3D", "glCompressedTexSubImage2D",
"glCompressedTexSubImage1D", "glGetCompressedTexImage", "glSampleCoverage", "glActiveTexture"
) && ext.contains("OpenGL13")) || reportMissing("GL", "OpenGL13");
) & ext.contains("OpenGL13")) || reportMissing("GL", "OpenGL13");
}

private static boolean check_GL14(FunctionProvider provider, PointerBuffer caps, Set<String> ext, boolean fc) {
Expand All @@ -7570,12 +7570,12 @@ private static boolean check_GL14(FunctionProvider provider, PointerBuffer caps,
"glSecondaryColor3uiv", "glSecondaryColorPointer", "glWindowPos2i", "glWindowPos2s", "glWindowPos2f", "glWindowPos2d", "glWindowPos2iv",
"glWindowPos2sv", "glWindowPos2fv", "glWindowPos2dv", "glWindowPos3i", "glWindowPos3s", "glWindowPos3f", "glWindowPos3d", "glWindowPos3iv",
"glWindowPos3sv", "glWindowPos3fv", "glWindowPos3dv"
)) && checkFunctions(provider, caps, new int[] {
)) & checkFunctions(provider, caps, new int[] {
386, 387, 393, 394, 395, 396, 397, 398, 416
},
"glBlendColor", "glBlendEquation", "glMultiDrawArrays", "glMultiDrawElements", "glPointParameterf", "glPointParameteri", "glPointParameterfv",
"glPointParameteriv", "glBlendFuncSeparate"
) && ext.contains("OpenGL14")) || reportMissing("GL", "OpenGL14");
) & ext.contains("OpenGL14")) || reportMissing("GL", "OpenGL14");
}

private static boolean check_GL15(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand All @@ -7586,7 +7586,7 @@ private static boolean check_GL15(FunctionProvider provider, PointerBuffer caps,
"glBindBuffer", "glDeleteBuffers", "glGenBuffers", "glIsBuffer", "glBufferData", "glBufferSubData", "glGetBufferSubData", "glMapBuffer",
"glUnmapBuffer", "glGetBufferParameteriv", "glGetBufferPointerv", "glGenQueries", "glDeleteQueries", "glIsQuery", "glBeginQuery", "glEndQuery",
"glGetQueryiv", "glGetQueryObjectiv", "glGetQueryObjectuiv"
) && ext.contains("OpenGL15")) || reportMissing("GL", "OpenGL15");
) & ext.contains("OpenGL15")) || reportMissing("GL", "OpenGL15");
}

private static boolean check_GL20(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand All @@ -7611,7 +7611,7 @@ private static boolean check_GL20(FunctionProvider provider, PointerBuffer caps,
"glEnableVertexAttribArray", "glDisableVertexAttribArray", "glBindAttribLocation", "glGetActiveAttrib", "glGetAttribLocation",
"glGetVertexAttribiv", "glGetVertexAttribfv", "glGetVertexAttribdv", "glGetVertexAttribPointerv", "glDrawBuffers", "glBlendEquationSeparate",
"glStencilOpSeparate", "glStencilFuncSeparate", "glStencilMaskSeparate"
) && ext.contains("OpenGL20")) || reportMissing("GL", "OpenGL20");
) & ext.contains("OpenGL20")) || reportMissing("GL", "OpenGL20");
}

private static boolean check_GL21(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand All @@ -7620,7 +7620,7 @@ private static boolean check_GL21(FunctionProvider provider, PointerBuffer caps,
545, 546, 547, 548, 549, 550
},
"glUniformMatrix2x3fv", "glUniformMatrix3x2fv", "glUniformMatrix2x4fv", "glUniformMatrix4x2fv", "glUniformMatrix3x4fv", "glUniformMatrix4x3fv"
) && ext.contains("OpenGL21")) || reportMissing("GL", "OpenGL21");
) & ext.contains("OpenGL21")) || reportMissing("GL", "OpenGL21");
}

private static boolean check_GL30(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand All @@ -7644,7 +7644,7 @@ private static boolean check_GL30(FunctionProvider provider, PointerBuffer caps,
"glGetTexParameterIuiv", "glColorMaski", "glGetBooleani_v", "glGetIntegeri_v", "glEnablei", "glDisablei", "glIsEnabledi", "glBindBufferRange",
"glBindBufferBase", "glBeginTransformFeedback", "glEndTransformFeedback", "glTransformFeedbackVaryings", "glGetTransformFeedbackVarying",
"glBindVertexArray", "glDeleteVertexArrays", "glGenVertexArrays", "glIsVertexArray"
) && ext.contains("OpenGL30")) || reportMissing("GL", "OpenGL30");
) & ext.contains("OpenGL30")) || reportMissing("GL", "OpenGL30");
}

private static boolean check_GL31(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand All @@ -7655,7 +7655,7 @@ private static boolean check_GL31(FunctionProvider provider, PointerBuffer caps,
"glDrawArraysInstanced", "glDrawElementsInstanced", "glCopyBufferSubData", "glPrimitiveRestartIndex", "glTexBuffer", "glGetUniformIndices",
"glGetActiveUniformsiv", "glGetActiveUniformName", "glGetUniformBlockIndex", "glGetActiveUniformBlockiv", "glGetActiveUniformBlockName",
"glUniformBlockBinding"
) && ext.contains("OpenGL31")) || reportMissing("GL", "OpenGL31");
) & ext.contains("OpenGL31")) || reportMissing("GL", "OpenGL31");
}

private static boolean check_GL32(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand All @@ -7667,7 +7667,7 @@ private static boolean check_GL32(FunctionProvider provider, PointerBuffer caps,
"glMultiDrawElementsBaseVertex", "glProvokingVertex", "glTexImage2DMultisample", "glTexImage3DMultisample", "glGetMultisamplefv", "glSampleMaski",
"glFramebufferTexture", "glFenceSync", "glIsSync", "glDeleteSync", "glClientWaitSync", "glWaitSync", "glGetInteger64v", "glGetInteger64i_v",
"glGetSynciv"
) && ext.contains("OpenGL32")) || reportMissing("GL", "OpenGL32");
) & ext.contains("OpenGL32")) || reportMissing("GL", "OpenGL32");
}

private static boolean check_GL33(FunctionProvider provider, PointerBuffer caps, Set<String> ext, boolean fc) {
Expand All @@ -7681,15 +7681,15 @@ private static boolean check_GL33(FunctionProvider provider, PointerBuffer caps,
"glMultiTexCoordP2ui", "glMultiTexCoordP3ui", "glMultiTexCoordP4ui", "glMultiTexCoordP1uiv", "glMultiTexCoordP2uiv", "glMultiTexCoordP3uiv",
"glMultiTexCoordP4uiv", "glNormalP3ui", "glNormalP3uiv", "glColorP3ui", "glColorP4ui", "glColorP3uiv", "glColorP4uiv", "glSecondaryColorP3ui",
"glSecondaryColorP3uiv"
)) && checkFunctions(provider, caps, new int[] {
)) & checkFunctions(provider, caps, new int[] {
666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 716, 717, 718, 719, 720, 721, 722, 723
},
"glBindFragDataLocationIndexed", "glGetFragDataIndex", "glGenSamplers", "glDeleteSamplers", "glIsSampler", "glBindSampler", "glSamplerParameteri",
"glSamplerParameterf", "glSamplerParameteriv", "glSamplerParameterfv", "glSamplerParameterIiv", "glSamplerParameterIuiv", "glGetSamplerParameteriv",
"glGetSamplerParameterfv", "glGetSamplerParameterIiv", "glGetSamplerParameterIuiv", "glQueryCounter", "glGetQueryObjecti64v",
"glGetQueryObjectui64v", "glVertexAttribDivisor", "glVertexAttribP1ui", "glVertexAttribP2ui", "glVertexAttribP3ui", "glVertexAttribP4ui",
"glVertexAttribP1uiv", "glVertexAttribP2uiv", "glVertexAttribP3uiv", "glVertexAttribP4uiv"
) && ext.contains("OpenGL33")) || reportMissing("GL", "OpenGL33");
) & ext.contains("OpenGL33")) || reportMissing("GL", "OpenGL33");
}

private static boolean check_GL40(FunctionProvider provider, PointerBuffer caps, Set<String> ext) {
Expand Down Expand Up @@ -7801,11 +7801,11 @@ private static boolean check_GL45(FunctionProvider provider, PointerBuffer caps,
int flag4 = provider.getFunctionAddress("glGetPixelMapuiv") != NULL ? 0 : Integer.MIN_VALUE;
int flag5 = provider.getFunctionAddress("glGetPixelMapusv") != NULL ? 0 : Integer.MIN_VALUE;
int flag6 = provider.getFunctionAddress("glGetPolygonStipple") != NULL ? 0 : Integer.MIN_VALUE;
int flag7 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE;
int flag8 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag9 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag10 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE;
int flag11 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE;
int flag7 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE;
int flag8 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag9 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag10 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE;
int flag11 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE;

return (checkFunctions(provider, caps, new int[] {
922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950,
Expand Down Expand Up @@ -8450,7 +8450,7 @@ private static boolean check_ARB_imaging(FunctionProvider provider, PointerBuffe
"glConvolutionParameteri", "glConvolutionParameteriv", "glConvolutionParameterf", "glConvolutionParameterfv", "glGetConvolutionParameteriv",
"glGetConvolutionParameterfv", "glHistogram", "glResetHistogram", "glGetHistogram", "glGetHistogramParameteriv", "glGetHistogramParameterfv",
"glMinmax", "glResetMinmax", "glGetMinmax", "glGetMinmaxParameteriv", "glGetMinmaxParameterfv"
)) && checkFunctions(provider, caps, new int[] {
)) & checkFunctions(provider, caps, new int[] {
386, 387
},
"glBlendColor", "glBlendEquation"
Expand Down Expand Up @@ -8684,11 +8684,11 @@ private static boolean check_ARB_robustness(FunctionProvider provider, PointerBu
int flag4 = provider.getFunctionAddress("glGetPixelMapuiv") != NULL ? 0 : Integer.MIN_VALUE;
int flag5 = provider.getFunctionAddress("glGetPixelMapusv") != NULL ? 0 : Integer.MIN_VALUE;
int flag6 = provider.getFunctionAddress("glGetPolygonStipple") != NULL ? 0 : Integer.MIN_VALUE;
int flag7 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE;
int flag8 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag9 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag10 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE;
int flag11 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE;
int flag7 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE;
int flag8 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag9 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE;
int flag10 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE;
int flag11 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE;
int flag12 = ext.contains("OpenGL13") ? 0 : Integer.MIN_VALUE;
int flag13 = ext.contains("OpenGL20") ? 0 : Integer.MIN_VALUE;
int flag15 = ext.contains("OpenGL30") ? 0 : Integer.MIN_VALUE;
Expand Down Expand Up @@ -9207,7 +9207,7 @@ private static boolean check_ARB_vertex_type_2_10_10_10_rev(FunctionProvider pro
"glMultiTexCoordP2ui", "glMultiTexCoordP3ui", "glMultiTexCoordP4ui", "glMultiTexCoordP1uiv", "glMultiTexCoordP2uiv", "glMultiTexCoordP3uiv",
"glMultiTexCoordP4uiv", "glNormalP3ui", "glNormalP3uiv", "glColorP3ui", "glColorP4ui", "glColorP3uiv", "glColorP4uiv", "glSecondaryColorP3ui",
"glSecondaryColorP3uiv"
)) && checkFunctions(provider, caps, new int[] {
)) & checkFunctions(provider, caps, new int[] {
716, 717, 718, 719, 720, 721, 722, 723
},
"glVertexAttribP1ui", "glVertexAttribP2ui", "glVertexAttribP3ui", "glVertexAttribP4ui", "glVertexAttribP1uiv", "glVertexAttribP2uiv",
Expand Down

0 comments on commit 26f86f6

Please sign in to comment.