public static void glVertexAttribI4uEXT(int index, ShortBuffer v) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glVertexAttribI4usvEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(v, 4);
   nglVertexAttribI4usvEXT(index, v, v.position(), function_pointer);
 }
 public static void glGetQueryARB(int target, int pname, IntBuffer params) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetQueryivARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(params, 1);
   nglGetQueryivARB(target, pname, MemoryUtil.getAddress(params), function_pointer);
 }
 public static void glExtGetProgramBinarySourceQCOM(
     int program, int shadertype, ByteBuffer source, IntBuffer length) {
   BufferChecks.checkDirect(source);
   BufferChecks.checkBuffer(length, 1);
   nglExtGetProgramBinarySourceQCOM(
       program, shadertype, MemoryUtil.getAddress(source), MemoryUtil.getAddress(length));
 }
 public static void glPointParameterEXT(int pname, FloatBuffer pfParams) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glPointParameterfvEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(pfParams, 4);
   nglPointParameterfvEXT(pname, MemoryUtil.getAddress(pfParams), 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 glGetColorTableParameterEXT(int target, int pname, IntBuffer params) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetColorTableParameterivEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(params, 4);
   nglGetColorTableParameterivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer);
 }
 public static void glGetVertexAttribArrayObjectATI(int index, int pname, IntBuffer params) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetVertexAttribArrayObjectivATI;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(params, 4);
   nglGetVertexAttribArrayObjectivATI(
       index, pname, MemoryUtil.getAddress(params), function_pointer);
 }
 public static void glColorTableEXT(
     int target, int internalFormat, int width, int format, int type, ShortBuffer data) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glColorTableEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1));
   nglColorTableEXT(
       target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer);
 }
Beispiel #9
0
 public static void glGetActiveAtomicCounterBuffer(
     int program, int bufferIndex, int pname, IntBuffer params) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glGetActiveAtomicCounterBufferiv;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(params, 1);
   nglGetActiveAtomicCounterBufferiv(
       program, bufferIndex, pname, MemoryUtil.getAddress(params), function_pointer);
 }
 public static void glColorSubTableEXT(
     int target, int start, int count, int format, int type, ByteBuffer data) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glColorSubTableEXT;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1));
   nglColorSubTableEXT(
       target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer);
 }
Beispiel #11
0
 public static int clEnqueueWriteBufferRect(
     CLCommandQueue command_queue,
     CLMem buffer,
     int blocking_write,
     PointerBuffer buffer_offset,
     PointerBuffer host_offset,
     PointerBuffer region,
     long buffer_row_pitch,
     long buffer_slice_pitch,
     long host_row_pitch,
     long host_slice_pitch,
     ShortBuffer ptr,
     PointerBuffer event_wait_list,
     PointerBuffer event) {
   long function_pointer = CLCapabilities.clEnqueueWriteBufferRect;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(buffer_offset, 3);
   BufferChecks.checkBuffer(host_offset, 3);
   BufferChecks.checkBuffer(region, 3);
   BufferChecks.checkBuffer(
       ptr,
       CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch));
   if (event_wait_list != null) BufferChecks.checkDirect(event_wait_list);
   if (event != null) BufferChecks.checkBuffer(event, 1);
   int __result =
       nclEnqueueWriteBufferRect(
           command_queue.getPointer(),
           buffer.getPointer(),
           blocking_write,
           MemoryUtil.getAddress(buffer_offset),
           MemoryUtil.getAddress(host_offset),
           MemoryUtil.getAddress(region),
           buffer_row_pitch,
           buffer_slice_pitch,
           host_row_pitch,
           host_slice_pitch,
           MemoryUtil.getAddress(ptr),
           (event_wait_list == null ? 0 : event_wait_list.remaining()),
           MemoryUtil.getAddressSafe(event_wait_list),
           MemoryUtil.getAddressSafe(event),
           function_pointer);
   if (__result == CL10.CL_SUCCESS) command_queue.registerCLEvent(event);
   return __result;
 }
Beispiel #12
0
 public static CLEvent clCreateUserEvent(CLContext context, IntBuffer errcode_ret) {
   long function_pointer = CLCapabilities.clCreateUserEvent;
   BufferChecks.checkFunctionAddress(function_pointer);
   if (errcode_ret != null) BufferChecks.checkBuffer(errcode_ret, 1);
   CLEvent __result =
       new CLEvent(
           nclCreateUserEvent(
               context.getPointer(), MemoryUtil.getAddressSafe(errcode_ret), function_pointer),
           context);
   return __result;
 }
 /*     */ public static void glGetInfoLogARB(int obj, IntBuffer length, ByteBuffer infoLog) {
   /* 379 */ ContextCapabilities caps = GLContext.getCapabilities();
   /* 380 */ long function_pointer = caps.glGetInfoLogARB;
   /* 381 */ BufferChecks.checkFunctionAddress(function_pointer);
   /* 382 */ if (length != null) /* 383 */ BufferChecks.checkBuffer(length, 1);
   /* 384 */ BufferChecks.checkDirect(infoLog);
   /* 385 */ nglGetInfoLogARB(
       obj,
       infoLog.remaining(),
       MemoryUtil.getAddressSafe(length),
       MemoryUtil.getAddress(infoLog),
       function_pointer);
   /*     */ }
 /*     */ public static void glGetShaderSourceARB(int obj, IntBuffer length, ByteBuffer source) {
   /* 531 */ ContextCapabilities caps = GLContext.getCapabilities();
   /* 532 */ long function_pointer = caps.glGetShaderSourceARB;
   /* 533 */ BufferChecks.checkFunctionAddress(function_pointer);
   /* 534 */ if (length != null) /* 535 */ BufferChecks.checkBuffer(length, 1);
   /* 536 */ BufferChecks.checkDirect(source);
   /* 537 */ nglGetShaderSourceARB(
       obj,
       source.remaining(),
       MemoryUtil.getAddressSafe(length),
       MemoryUtil.getAddress(source),
       function_pointer);
   /*     */ }
Beispiel #15
0
 public static int clEnqueueCopyBufferRect(
     CLCommandQueue command_queue,
     CLMem src_buffer,
     CLMem dst_buffer,
     PointerBuffer src_origin,
     PointerBuffer dst_origin,
     PointerBuffer region,
     long src_row_pitch,
     long src_slice_pitch,
     long dst_row_pitch,
     long dst_slice_pitch,
     PointerBuffer event_wait_list,
     PointerBuffer event) {
   long function_pointer = CLCapabilities.clEnqueueCopyBufferRect;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(src_origin, 3);
   BufferChecks.checkBuffer(dst_origin, 3);
   BufferChecks.checkBuffer(region, 3);
   if (event_wait_list != null) BufferChecks.checkDirect(event_wait_list);
   if (event != null) BufferChecks.checkBuffer(event, 1);
   int __result =
       nclEnqueueCopyBufferRect(
           command_queue.getPointer(),
           src_buffer.getPointer(),
           dst_buffer.getPointer(),
           MemoryUtil.getAddress(src_origin),
           MemoryUtil.getAddress(dst_origin),
           MemoryUtil.getAddress(region),
           src_row_pitch,
           src_slice_pitch,
           dst_row_pitch,
           dst_slice_pitch,
           (event_wait_list == null ? 0 : event_wait_list.remaining()),
           MemoryUtil.getAddressSafe(event_wait_list),
           MemoryUtil.getAddressSafe(event),
           function_pointer);
   if (__result == CL10.CL_SUCCESS) command_queue.registerCLEvent(event);
   return __result;
 }
Beispiel #16
0
 public static int clIcdGetPlatformIDsKHR(PointerBuffer platforms, IntBuffer num_platforms) {
   long function_pointer = CLCapabilities.clIcdGetPlatformIDsKHR;
   BufferChecks.checkFunctionAddress(function_pointer);
   if (platforms != null) BufferChecks.checkDirect(platforms);
   if (num_platforms != null) BufferChecks.checkBuffer(num_platforms, 1);
   int __result =
       nclIcdGetPlatformIDsKHR(
           (platforms == null ? 0 : platforms.remaining()),
           MemoryUtil.getAddressSafe(platforms),
           MemoryUtil.getAddressSafe(num_platforms),
           function_pointer);
   return __result;
 }
Beispiel #17
0
 public static CLMem clCreateSubBuffer(
     CLMem buffer,
     long flags,
     int buffer_create_type,
     ByteBuffer buffer_create_info,
     IntBuffer errcode_ret) {
   long function_pointer = CLCapabilities.clCreateSubBuffer;
   BufferChecks.checkFunctionAddress(function_pointer);
   BufferChecks.checkBuffer(buffer_create_info, 2 * PointerBuffer.getPointerSize());
   if (errcode_ret != null) BufferChecks.checkBuffer(errcode_ret, 1);
   CLMem __result =
       CLMem.create(
           nclCreateSubBuffer(
               buffer.getPointer(),
               flags,
               buffer_create_type,
               MemoryUtil.getAddress(buffer_create_info),
               MemoryUtil.getAddressSafe(errcode_ret),
               function_pointer),
           buffer.getParent());
   return __result;
 }
 /*     */ public static void glGetAttachedObjectsARB(
     int containerObj, IntBuffer count, IntBuffer obj) {
   /* 402 */ ContextCapabilities caps = GLContext.getCapabilities();
   /* 403 */ long function_pointer = caps.glGetAttachedObjectsARB;
   /* 404 */ BufferChecks.checkFunctionAddress(function_pointer);
   /* 405 */ if (count != null) /* 406 */ BufferChecks.checkBuffer(count, 1);
   /* 407 */ BufferChecks.checkDirect(obj);
   /* 408 */ nglGetAttachedObjectsARB(
       containerObj,
       obj.remaining(),
       MemoryUtil.getAddressSafe(count),
       MemoryUtil.getAddress(obj),
       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;
 }
 /*     */ public static void glGetActiveUniformARB(
     int programObj,
     int index,
     IntBuffer length,
     IntBuffer size,
     IntBuffer type,
     ByteBuffer name) {
   /* 439 */ ContextCapabilities caps = GLContext.getCapabilities();
   /* 440 */ long function_pointer = caps.glGetActiveUniformARB;
   /* 441 */ BufferChecks.checkFunctionAddress(function_pointer);
   /* 442 */ if (length != null) /* 443 */ BufferChecks.checkBuffer(length, 1);
   /* 444 */ BufferChecks.checkBuffer(size, 1);
   /* 445 */ BufferChecks.checkBuffer(type, 1);
   /* 446 */ BufferChecks.checkDirect(name);
   /* 447 */ nglGetActiveUniformARB(
       programObj,
       index,
       name.remaining(),
       MemoryUtil.getAddressSafe(length),
       MemoryUtil.getAddress(size),
       MemoryUtil.getAddress(type),
       MemoryUtil.getAddress(name),
       function_pointer);
   /*     */ }
 /*     */ public static String glGetActiveUniformARB(
     int programObj, int index, int maxLength, IntBuffer sizeType)
       /*     */ {
   /* 457 */ ContextCapabilities caps = GLContext.getCapabilities();
   /* 458 */ long function_pointer = caps.glGetActiveUniformARB;
   /* 459 */ BufferChecks.checkFunctionAddress(function_pointer);
   /* 460 */ BufferChecks.checkBuffer(sizeType, 2);
   /* 461 */ IntBuffer name_length = APIUtil.getLengths(caps);
   /* 462 */ ByteBuffer name = APIUtil.getBufferByte(caps, maxLength);
   /* 463 */ nglGetActiveUniformARB(
       programObj,
       index,
       maxLength,
       MemoryUtil.getAddress0(name_length),
       MemoryUtil.getAddress(sizeType),
       MemoryUtil.getAddress(sizeType, sizeType.position() + 1),
       MemoryUtil.getAddress(name),
       function_pointer);
   /* 464 */ name.limit(name_length.get(0));
   /* 465 */ return APIUtil.getString(caps, name);
   /*     */ }
 public static void glGetFramebufferAttachmentParameterOES(
     int target, int attachment, int pname, IntBuffer params) {
   BufferChecks.checkBuffer(params, 1);
   nglGetFramebufferAttachmentParameterivOES(
       target, attachment, pname, MemoryUtil.getAddress(params));
 }
 public static void glGetRenderbufferParameterOES(int target, int pname, IntBuffer params) {
   BufferChecks.checkBuffer(params, 1);
   nglGetRenderbufferParameterivOES(target, pname, MemoryUtil.getAddress(params));
 }
 public static void glExtGetShadersQCOM(IntBuffer shaders, IntBuffer numShaders) {
   BufferChecks.checkBuffer(shaders, 1);
   BufferChecks.checkBuffer(numShaders, 1);
   nglExtGetShadersQCOM(
       MemoryUtil.getAddress(shaders), shaders.remaining(), MemoryUtil.getAddress(numShaders));
 }
 public static void glExtGetProgramsQCOM(IntBuffer programs, IntBuffer numPrograms) {
   BufferChecks.checkBuffer(programs, 1);
   BufferChecks.checkBuffer(numPrograms, 1);
   nglExtGetProgramsQCOM(
       MemoryUtil.getAddress(programs), programs.remaining(), MemoryUtil.getAddress(numPrograms));
 }