public static void glUniform4uEXT(int location, IntBuffer value) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glUniform4uivEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkDirect(value);
   nglUniform4uivEXT(location, value.remaining() >> 2, value, value.position(), function_pointer);
 }
 /** Overloads glGenQueriesARB. */
 public static int glGenQueriesARB() {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGenQueriesARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   IntBuffer ids = APIUtil.getBufferInt(caps);
   nglGenQueriesARB(1, MemoryUtil.getAddress(ids), function_pointer);
   return ids.get(0);
 }
 /** Overloads glGetQueryObjectuivARB. */
 public static int glGetQueryObjectuiARB(int id, int pname) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetQueryObjectuivARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   IntBuffer params = APIUtil.getBufferInt(caps);
   nglGetQueryObjectuivARB(id, pname, MemoryUtil.getAddress(params), function_pointer);
   return params.get(0);
 }
Example #4
0
 /** Overloads glGetInternalformativ. */
 public static int glGetInternalformat(int target, int internalformat, int pname) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetInternalformativ;
   BufferChecks.checkFunctionAddress(function_pointer);
   IntBuffer params = APIUtil.getBufferInt(caps);
   nglGetInternalformativ(
       target, internalformat, pname, 1, MemoryUtil.getAddress(params), function_pointer);
   return params.get(0);
 }
Example #5
0
 /** Overloads glGetActiveAtomicCounterBufferiv. */
 public static int glGetActiveAtomicCounterBuffer(int program, int bufferIndex, int pname) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetActiveAtomicCounterBufferiv;
   BufferChecks.checkFunctionAddress(function_pointer);
   IntBuffer params = APIUtil.getBufferInt(caps);
   nglGetActiveAtomicCounterBufferiv(
       program, bufferIndex, pname, MemoryUtil.getAddress(params), function_pointer);
   return params.get(0);
 }
Example #6
0
  static {
    IntBuffer offsets = memAllocInt(2);

    SIZEOF = offsets(memAddress(offsets));

    X = offsets.get(0);
    Y = offsets.get(1);

    memFree(offsets);
  }
 public static void glDrawElementsBaseVertex(int mode, IntBuffer indices, int basevertex) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.ARB_draw_elements_base_vertex_glDrawElementsBaseVertex_pointer;
   BufferChecks.checkFunctionAddress(function_pointer);
   GLChecks.ensureElementVBOdisabled(caps);
   BufferChecks.checkDirect(indices);
   nglDrawElementsBaseVertex(
       mode,
       (indices.remaining()),
       GL11.GL_UNSIGNED_INT,
       indices,
       indices.position() << 2,
       basevertex,
       function_pointer);
 }
 public static void glDeleteQueriesARB(IntBuffer ids) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glDeleteQueriesARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkDirect(ids);
   nglDeleteQueriesARB(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer);
 }
 public static void glGetVertexAttribIuEXT(int index, int pname, IntBuffer params) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetVertexAttribIuivEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(params, 4);
   nglGetVertexAttribIuivEXT(index, pname, params, params.position(), function_pointer);
 }
 public static void glGetUniformuEXT(int program, int location, IntBuffer params) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetUniformuivEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkDirect(params);
   nglGetUniformuivEXT(program, location, params, params.position(), function_pointer);
 }
Example #11
0
 public static void glWeightARB(IntBuffer pWeights) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glWeightivARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkDirect(pWeights);
   nglWeightivARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer);
 }
 public static void glDebugMessageControlARB(
     int source, int type, int severity, IntBuffer ids, boolean enabled) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glDebugMessageControlARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   if (ids != null) BufferChecks.checkDirect(ids);
   nglDebugMessageControlARB(
       source,
       type,
       severity,
       (ids == null ? 0 : ids.remaining()),
       ids,
       ids != null ? ids.position() : 0,
       enabled,
       function_pointer);
 }
 public static void glVertexAttribI4uEXT(int index, IntBuffer v) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glVertexAttribI4uivEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(v, 4);
   nglVertexAttribI4uivEXT(index, v, v.position(), function_pointer);
 }
 public static void glVertexAttribIPointerEXT(
     int index, int size, int type, int stride, IntBuffer buffer) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glVertexAttribIPointerEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   GLChecks.ensureArrayVBOdisabled(caps);
   BufferChecks.checkDirect(buffer);
   if (LWJGLUtil.CHECKS)
     StateTracker.getReferences(caps).EXT_gpu_shader4_glVertexAttribIPointerEXT_buffer = buffer;
   nglVertexAttribIPointerEXT(
       index, size, type, stride, buffer, buffer.position() << 2, function_pointer);
 }
 /** Alternative version of: {@link #glGetPerfMonitorCountersAMD GetPerfMonitorCountersAMD} */
 public static void glGetPerfMonitorCountersAMD(
     int group, IntBuffer numCounters, IntBuffer maxActiveCounters, IntBuffer counters) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(numCounters, 1);
     checkBuffer(maxActiveCounters, 1);
   }
   nglGetPerfMonitorCountersAMD(
       group,
       memAddress(numCounters),
       memAddress(maxActiveCounters),
       counters.remaining(),
       memAddress(counters));
 }
  static {
    IntBuffer offsets = BufferUtils.createIntBuffer(6);

    SIZEOF = offsets(memAddress(offsets));

    WIDTH = offsets.get(0);
    HEIGHT = offsets.get(1);
    REDBITS = offsets.get(2);
    GREENBITS = offsets.get(3);
    BLUEBITS = offsets.get(4);
    REFRESHRATE = offsets.get(5);
  }
Example #17
0
 public static void glGetInternalformat(
     int target, int internalformat, int pname, IntBuffer params) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetInternalformativ;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkDirect(params);
   nglGetInternalformativ(
       target,
       internalformat,
       pname,
       params.remaining(),
       MemoryUtil.getAddress(params),
       function_pointer);
 }
 public static int glGetDebugMessageLogARB(
     int count,
     IntBuffer sources,
     IntBuffer types,
     IntBuffer ids,
     IntBuffer severities,
     IntBuffer lengths,
     ByteBuffer messageLog) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetDebugMessageLogARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   if (sources != null) BufferChecks.checkBuffer(sources, count);
   if (types != null) BufferChecks.checkBuffer(types, count);
   if (ids != null) BufferChecks.checkBuffer(ids, count);
   if (severities != null) BufferChecks.checkBuffer(severities, count);
   if (lengths != null) BufferChecks.checkBuffer(lengths, count);
   if (messageLog != null) BufferChecks.checkDirect(messageLog);
   int __result =
       nglGetDebugMessageLogARB(
           count,
           (messageLog == null ? 0 : messageLog.remaining()),
           sources,
           sources != null ? sources.position() : 0,
           types,
           types != null ? types.position() : 0,
           ids,
           ids != null ? ids.position() : 0,
           severities,
           severities != null ? severities.position() : 0,
           lengths,
           lengths != null ? lengths.position() : 0,
           messageLog,
           messageLog != null ? messageLog.position() : 0,
           function_pointer);
   return __result;
 }
Example #19
0
 public static void glDrawElementsInstancedBaseInstance(
     int mode, IntBuffer indices, int primcount, int baseinstance) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glDrawElementsInstancedBaseInstance;
   BufferChecks.checkFunctionAddress(function_pointer);
   GLChecks.ensureElementVBOdisabled(caps);
   BufferChecks.checkDirect(indices);
   nglDrawElementsInstancedBaseInstance(
       mode,
       indices.remaining(),
       GL11.GL_UNSIGNED_INT,
       MemoryUtil.getAddress(indices),
       primcount,
       baseinstance,
       function_pointer);
 }
Example #20
0
 /** Alternative version of: {@link #glDeleteQueries DeleteQueries} */
 public static void glDeleteQueries(IntBuffer ids) {
   nglDeleteQueries(ids.remaining(), memAddress(ids));
 }
Example #21
0
 /** IntBuffer version of: {@link #glGetBufferSubData GetBufferSubData} */
 public static void glGetBufferSubData(int target, long offset, IntBuffer data) {
   nglGetBufferSubData(target, offset, data.remaining() << 2, memAddress(data));
 }
Example #22
0
 /** IntBuffer version of: {@link #glBufferData BufferData} */
 public static void glBufferData(int target, IntBuffer data, int usage) {
   nglBufferData(target, data.remaining() << 2, memAddress(data), usage);
 }
Example #23
0
 /** Alternative version of: {@link #glGenBuffers GenBuffers} */
 public static void glGenBuffers(IntBuffer buffers) {
   nglGenBuffers(buffers.remaining(), memAddress(buffers));
 }
 public static void glDeleteRenderbuffersOES(IntBuffer renderbuffers) {
   BufferChecks.checkDirect(renderbuffers);
   nglDeleteRenderbuffersOES(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers));
 }
 /** Overloads glGetFramebufferAttachmentParameterivOES. */
 public static int glGetFramebufferAttachmentParameteriOES(int target, int attachment, int pname) {
   IntBuffer params = APIUtil.getBufferInt();
   nglGetFramebufferAttachmentParameterivOES(
       target, attachment, pname, MemoryUtil.getAddress(params));
   return params.get(0);
 }
 /** Overloads glGenFramebuffersOES. */
 public static int glGenFramebuffersOES() {
   IntBuffer framebuffers = APIUtil.getBufferInt();
   nglGenFramebuffersOES(1, MemoryUtil.getAddress(framebuffers));
   return framebuffers.get(0);
 }
 public static void glGenFramebuffersOES(IntBuffer framebuffers) {
   BufferChecks.checkDirect(framebuffers);
   nglGenFramebuffersOES(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers));
 }
 /** Overloads glGenRenderbuffersOES. */
 public static int glGenRenderbuffersOES() {
   IntBuffer renderbuffers = APIUtil.getBufferInt();
   nglGenRenderbuffersOES(1, MemoryUtil.getAddress(renderbuffers));
   return renderbuffers.get(0);
 }
Example #29
0
 /** GL_UNSIGNED_INT version of: {@link #glDrawRangeElements DrawRangeElements} */
 public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) {
   if (LWJGLUtil.CHECKS) GLChecks.ensureBufferObject(GL15.GL_ELEMENT_ARRAY_BUFFER_BINDING, false);
   nglDrawRangeElements(
       mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices));
 }
 /** Alternative version of: {@link #glScissorArrayv ScissorArrayv} */
 public static void glScissorArrayv(int first, IntBuffer v) {
   nglScissorArrayv(first, v.remaining() >> 2, memAddress(v));
 }