Example #1
0
  static GL15 create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("OpenGL15")) return null;

    GL15 funcs = new GL15(provider);

    boolean supported =
        checkFunctions(
            funcs.BindBuffer,
            funcs.DeleteBuffers,
            funcs.GenBuffers,
            funcs.IsBuffer,
            funcs.BufferData,
            funcs.BufferSubData,
            funcs.GetBufferSubData,
            funcs.MapBuffer,
            funcs.UnmapBuffer,
            funcs.GetBufferParameteriv,
            funcs.GetBufferPointerv,
            funcs.GenQueries,
            funcs.DeleteQueries,
            funcs.IsQuery,
            funcs.BeginQuery,
            funcs.EndQuery,
            funcs.GetQueryiv,
            funcs.GetQueryObjectiv,
            funcs.GetQueryObjectuiv);

    return GL.checkExtension("OpenGL15", funcs, supported);
  }
  static NVPixelDataRange create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_NV_pixel_data_range")) return null;

    NVPixelDataRange funcs = new NVPixelDataRange(provider);

    boolean supported = checkFunctions(funcs.PixelDataRangeNV, funcs.FlushPixelDataRangeNV);

    return GL.checkExtension("GL_NV_pixel_data_range", funcs, supported);
  }
  static WGLAMDGPUAssociation create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("WGL_AMD_gpu_association")) return null;

    WGLAMDGPUAssociation funcs = new WGLAMDGPUAssociation(provider);

    boolean supported =
        checkFunctions(
            funcs.GetGPUIDsAMD,
            funcs.GetGPUInfoAMD,
            funcs.GetContextGPUIDAMD,
            funcs.CreateAssociatedContextAMD,
            funcs.CreateAssociatedContextAttribsAMD,
            funcs.DeleteAssociatedContextAMD,
            funcs.MakeAssociatedContextCurrentAMD,
            funcs.GetCurrentAssociatedContextAMD,
            ext.contains("GL_EXT_framebuffer_blit") ? funcs.BlitContextFramebufferAMD : -1L);

    return GL.checkExtension("WGL_AMD_gpu_association", funcs, supported);
  }
Example #4
0
  static GLX11 create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GLX_11")) return null;

    GLX11 funcs = new GLX11(provider);

    boolean supported =
        checkFunctions(funcs.QueryExtensionsString, funcs.GetClientString, funcs.QueryServerString);

    return GL.checkExtension("GLX_11", funcs, supported);
  }
  static NVBindlessMultiDrawIndirectCount create(
      java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_NV_bindless_multi_draw_indirect_count")) return null;

    NVBindlessMultiDrawIndirectCount funcs = new NVBindlessMultiDrawIndirectCount(provider);

    boolean supported =
        checkFunctions(
            funcs.MultiDrawArraysIndirectBindlessCountNV,
            funcs.MultiDrawElementsIndirectBindlessCountNV);

    return GL.checkExtension("GL_NV_bindless_multi_draw_indirect_count", funcs, supported);
  }
Example #6
0
  static GL12 create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("OpenGL12")) return null;

    GL12 funcs = new GL12(provider);

    boolean supported =
        checkFunctions(
            funcs.TexImage3D,
            funcs.TexSubImage3D,
            funcs.CopyTexSubImage3D,
            funcs.DrawRangeElements);

    return GL.checkExtension("OpenGL12", funcs, supported);
  }
  static WGLNVGPUAffinity create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("WGL_NV_gpu_affinity")) return null;

    WGLNVGPUAffinity funcs = new WGLNVGPUAffinity(provider);

    boolean supported =
        checkFunctions(
            funcs.EnumGpusNV,
            funcs.EnumGpuDevicesNV,
            funcs.CreateAffinityDCNV,
            funcs.EnumGpusFromAffinityDCNV,
            funcs.DeleteDCNV);

    return GL.checkExtension("WGL_NV_gpu_affinity", funcs, supported);
  }
  static GLXEXTImportContext create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GLX_EXT_import_context")) return null;

    GLXEXTImportContext funcs = new GLXEXTImportContext(provider);

    boolean supported =
        checkFunctions(
            funcs.GetCurrentDisplayEXT,
            funcs.QueryContextInfoEXT,
            funcs.GetContextIDEXT,
            funcs.ImportContextEXT,
            funcs.FreeContextEXT);

    return GL.checkExtension("GLX_EXT_import_context", funcs, supported);
  }
  static EXTTextureInteger create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_EXT_texture_integer")) return null;

    EXTTextureInteger funcs = new EXTTextureInteger(provider);

    boolean supported =
        checkFunctions(
            funcs.ClearColorIiEXT,
            funcs.ClearColorIuiEXT,
            funcs.TexParameterIivEXT,
            funcs.TexParameterIuivEXT,
            funcs.GetTexParameterIivEXT,
            funcs.GetTexParameterIuivEXT);

    return GL.checkExtension("GL_EXT_texture_integer", funcs, supported);
  }
Example #10
0
  static WGLNVDXInterop create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("WGL_NV_DX_interop")) return null;

    WGLNVDXInterop funcs = new WGLNVDXInterop(provider);

    boolean supported =
        checkFunctions(
            funcs.DXSetResourceShareHandleNV,
            funcs.DXOpenDeviceNV,
            funcs.DXCloseDeviceNV,
            funcs.DXRegisterObjectNV,
            funcs.DXUnregisterObjectNV,
            funcs.DXObjectAccessNV,
            funcs.DXLockObjectsNV,
            funcs.DXUnlockObjectsNV);

    return GL.checkExtension("WGL_NV_DX_interop", funcs, supported);
  }
  static ARBShaderSubroutine create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_ARB_shader_subroutine")) return null;

    ARBShaderSubroutine funcs = new ARBShaderSubroutine(provider);

    boolean supported =
        checkFunctions(
            funcs.GetSubroutineUniformLocation,
            funcs.GetSubroutineIndex,
            funcs.GetActiveSubroutineUniformiv,
            funcs.GetActiveSubroutineUniformName,
            funcs.GetActiveSubroutineName,
            funcs.UniformSubroutinesuiv,
            funcs.GetUniformSubroutineuiv,
            funcs.GetProgramStageiv);

    return GL.checkExtension("GL_ARB_shader_subroutine", funcs, supported);
  }
  static ARBViewportArray create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_ARB_viewport_array")) return null;

    ARBViewportArray funcs = new ARBViewportArray(provider);

    boolean supported =
        checkFunctions(
            funcs.ViewportArrayv,
            funcs.ViewportIndexedf,
            funcs.ViewportIndexedfv,
            funcs.ScissorArrayv,
            funcs.ScissorIndexed,
            funcs.ScissorIndexedv,
            funcs.DepthRangeArrayv,
            funcs.DepthRangeIndexed,
            funcs.GetFloati_v,
            funcs.GetDoublei_v);

    return GL.checkExtension("GL_ARB_viewport_array", funcs, supported);
  }
  static ARBUniformBufferObject create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_ARB_uniform_buffer_object")) return null;

    ARBUniformBufferObject funcs = new ARBUniformBufferObject(provider);

    boolean supported =
        checkFunctions(
            funcs.GetUniformIndices,
            funcs.GetActiveUniformsiv,
            funcs.GetActiveUniformName,
            funcs.GetUniformBlockIndex,
            funcs.GetActiveUniformBlockiv,
            funcs.GetActiveUniformBlockName,
            funcs.BindBufferRange,
            funcs.BindBufferBase,
            funcs.GetIntegeri_v,
            funcs.UniformBlockBinding);

    return GL.checkExtension("GL_ARB_uniform_buffer_object", funcs, supported);
  }
  static AMDPerformanceMonitor create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_AMD_performance_monitor")) return null;

    AMDPerformanceMonitor funcs = new AMDPerformanceMonitor(provider);

    boolean supported =
        checkFunctions(
            funcs.GetPerfMonitorGroupsAMD,
            funcs.GetPerfMonitorCountersAMD,
            funcs.GetPerfMonitorGroupStringAMD,
            funcs.GetPerfMonitorCounterStringAMD,
            funcs.GetPerfMonitorCounterInfoAMD,
            funcs.GenPerfMonitorsAMD,
            funcs.DeletePerfMonitorsAMD,
            funcs.SelectPerfMonitorCountersAMD,
            funcs.BeginPerfMonitorAMD,
            funcs.EndPerfMonitorAMD,
            funcs.GetPerfMonitorCounterDataAMD);

    return GL.checkExtension("GL_AMD_performance_monitor", funcs, supported);
  }