Пример #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);
  }
Пример #2
0
 /** Array version of: {@link #glGetVertexAttribIuivEXT GetVertexAttribIuivEXT} */
 public static void glGetVertexAttribIuivEXT(int index, int pname, int[] params) {
   long __functionAddress = GL.getCapabilities().glGetVertexAttribIuivEXT;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(params, 4);
   }
   callPV(__functionAddress, index, pname, params);
 }
Пример #3
0
 /** Array version of: {@link #glVertexAttribI2uivEXT VertexAttribI2uivEXT} */
 public static void glVertexAttribI2uivEXT(int index, int[] v) {
   long __functionAddress = GL.getCapabilities().glVertexAttribI2uivEXT;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(v, 2);
   }
   callPV(__functionAddress, index, v);
 }
Пример #4
0
 /** Array version of: {@link #glWindowPos3dvARB WindowPos3dvARB} */
 public static void glWindowPos3dvARB(double[] p) {
   long __functionAddress = GL.getCapabilities().glWindowPos3dvARB;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(p, 3);
   }
   callPV(__functionAddress, p);
 }
Пример #5
0
 /** Array version of: {@link #glGetUniformuivEXT GetUniformuivEXT} */
 public static void glGetUniformuivEXT(int program, int location, int[] params) {
   long __functionAddress = GL.getCapabilities().glGetUniformuivEXT;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(params, 1);
   }
   callPV(__functionAddress, program, location, params);
 }
Пример #6
0
  static GLXSGIXSwapGroup create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GLX_SGIX_swap_group")) return null;

    GLXSGIXSwapGroup funcs = new GLXSGIXSwapGroup(provider);

    boolean supported = checkFunctions(funcs.JoinSwapGroupSGIX);

    return GL.checkExtension("GLX_SGIX_swap_group", funcs, supported);
  }
Пример #7
0
  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);
  }
Пример #8
0
 /** int[] version of: {@link #glVertexAttribIPointerEXT VertexAttribIPointerEXT} */
 public static void glVertexAttribIPointerEXT(
     int index, int size, int type, int stride, int[] pointer) {
   long __functionAddress = GL.getCapabilities().glVertexAttribIPointerEXT;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     GLChecks.ensureBufferObject(GL15.GL_ARRAY_BUFFER_BINDING, false);
   }
   callPV(__functionAddress, index, size, type, stride, pointer);
 }
  static ARBComputeVariableGroupSize create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_ARB_compute_variable_group_size")) return null;

    ARBComputeVariableGroupSize funcs = new ARBComputeVariableGroupSize(provider);

    boolean supported = checkFunctions(funcs.DispatchComputeGroupSizeARB);

    return GL.checkExtension("GL_ARB_compute_variable_group_size", funcs, supported);
  }
Пример #10
0
  static ARBCopyImage create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_ARB_copy_image")) return null;

    ARBCopyImage funcs = new ARBCopyImage(provider);

    boolean supported = checkFunctions(funcs.CopyImageSubData);

    return GL.checkExtension("GL_ARB_copy_image", funcs, supported);
  }
Пример #11
0
  static ARBTextureBarrier create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GL_ARB_texture_barrier")) return null;

    ARBTextureBarrier funcs = new ARBTextureBarrier(provider);

    boolean supported = checkFunctions(funcs.TextureBarrier);

    return GL.checkExtension("GL_ARB_texture_barrier", funcs, supported);
  }
Пример #12
0
  static WGLARBMakeCurrentRead create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("WGL_ARB_make_current_read")) return null;

    WGLARBMakeCurrentRead funcs = new WGLARBMakeCurrentRead(provider);

    boolean supported = checkFunctions(funcs.MakeContextCurrentARB, funcs.GetCurrentReadDCARB);

    return GL.checkExtension("WGL_ARB_make_current_read", funcs, supported);
  }
Пример #13
0
  static GLX12 create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GLX12")) return null;

    GLX12 funcs = new GLX12(provider);

    boolean supported = checkFunctions(funcs.GetCurrentDisplay);

    return GL.checkExtension("GLX12", funcs, supported);
  }
Пример #14
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);
  }
Пример #16
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 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);
  }
Пример #18
0
  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 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);
  }
Пример #20
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);
  }
Пример #22
0
  static GLXAMDGPUAssociation create(java.util.Set<String> ext, FunctionProvider provider) {
    if (!ext.contains("GLX_AMD_gpu_association")) return null;

    GLXAMDGPUAssociation funcs = new GLXAMDGPUAssociation(provider);

    boolean supported =
        checkFunctions(
            funcs.BlitContextFramebufferAMD,
            funcs.CreateAssociatedContextAMD,
            funcs.CreateAssociatedContextAttribsAMD,
            funcs.DeleteAssociatedContextAMD,
            funcs.GetContextGPUIDAMD,
            funcs.GetCurrentAssociatedContextAMD,
            funcs.GetGPUIDsAMD,
            funcs.GetGPUInfoAMD,
            funcs.MakeAssociatedContextCurrentAMD);

    return GL.checkExtension("GLX_AMD_gpu_association", 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);
  }
Пример #25
0
  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);
  }
Пример #26
0
 /** Returns the {@link GL15} instance for the current context. */
 public static GL15 getInstance() {
   return checkFunctionality(GL.getCapabilities().__GL15);
 }
Пример #27
0
 /** Returns the {@link GL12} instance for the current context. */
 public static GL12 getInstance() {
   return GL.getCapabilities().__GL12;
 }
Пример #28
0
 /** Returns the {@link WGLNVDXInterop} instance for the current context. */
 public static WGLNVDXInterop getInstance() {
   return GL.getCapabilities().__WGLNVDXInterop;
 }
 /** Returns the {@link NVBindlessMultiDrawIndirectCount} instance for the current context. */
 public static NVBindlessMultiDrawIndirectCount getInstance() {
   return checkFunctionality(GL.getCapabilities().__NVBindlessMultiDrawIndirectCount);
 }
Пример #30
0
 /** Returns the {@link WGLNVGPUAffinity} instance of the current context. */
 public static WGLNVGPUAffinity getInstance() {
   return getInstance(GL.getCapabilities());
 }