Beispiel #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 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);
  }
  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);
  }
Beispiel #7
0
 /** Returns the {@link GL15} instance for the current context. */
 public static GL15 getInstance() {
   return checkFunctionality(GL.getCapabilities().__GL15);
 }
 /** Returns the {@link EXTTextureInteger} instance for the current context. */
 public static EXTTextureInteger getInstance() {
   return checkFunctionality(GL.getCapabilities().__EXTTextureInteger);
 }
 /** Returns the {@link ARBViewportArray} instance for the current context. */
 public static ARBViewportArray getInstance() {
   return checkFunctionality(GL.getCapabilities().__ARBViewportArray);
 }
 /** Returns the {@link org.lwjgl.opengl.ARBShaderSubroutine} instance for the current context. */
 public static ARBShaderSubroutine getInstance() {
   return GL.getCapabilities().__ARBShaderSubroutine;
 }
 /** Returns the {@link ARBUniformBufferObject} instance for the current context. */
 public static ARBUniformBufferObject getInstance() {
   return checkFunctionality(GL.getCapabilities().__ARBUniformBufferObject);
 }
 /** Returns the {@link AMDPerformanceMonitor} instance for the current context. */
 public static AMDPerformanceMonitor getInstance() {
   return checkFunctionality(GL.getCapabilities().__AMDPerformanceMonitor);
 }