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 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; }
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 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 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 glCompressedTexSubImage3DARB( int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, ByteBuffer pData) { ContextCapabilities caps = GLContext.getCapabilities(); long function_pointer = caps.glCompressedTexSubImage3DARB; BufferChecks.checkFunctionAddress(function_pointer); GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkDirect(pData); nglCompressedTexSubImage3DARB( target, level, xoffset, yoffset, zoffset, width, height, depth, format, pData.remaining(), MemoryUtil.getAddress(pData), 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 glGetColorTableEXT(int target, int format, int type, ShortBuffer data) { ContextCapabilities caps = GLContext.getCapabilities(); long function_pointer = caps.glGetColorTableEXT; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(data); nglGetColorTableEXT(target, format, type, MemoryUtil.getAddress(data), function_pointer); }
public static void glWeightARB(DoubleBuffer pWeights) { ContextCapabilities caps = GLContext.getCapabilities(); long function_pointer = caps.glWeightdvARB; BufferChecks.checkFunctionAddress(function_pointer); BufferChecks.checkDirect(pWeights); nglWeightdvARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), 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 glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) { ContextCapabilities caps = GLContext.getCapabilities(); long function_pointer = caps.glGetCompressedTexImageARB; BufferChecks.checkFunctionAddress(function_pointer); GLChecks.ensurePackPBOdisabled(caps); BufferChecks.checkDirect(pImg); nglGetCompressedTexImageARB(target, lod, MemoryUtil.getAddress(pImg), 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); }
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); }
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); }
/** 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); }
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); }
/** 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); }
/** Print more elaborate memory management statistics. */ @Test public void printMemoryManagementStats() { if (log.isInfoEnabled()) { log.info("Before:" + MemoryUtil.printBasicMemoryStats()); log.info("Before:" + MemoryUtil.printMemoryManagementStats()); } MemoryUtil.printMemoryManagementStats(); // Tweak memory a little bit for (int i = 0; i < 1000000; i++) { @SuppressWarnings("unused") final String s = "My String " + i; } if (log.isInfoEnabled()) { log.info("After:" + MemoryUtil.printBasicMemoryStats()); log.info("After:" + MemoryUtil.printMemoryManagementStats()); } }
public static void glWeightPointerARB(int size, int stride, FloatBuffer pPointer) { ContextCapabilities caps = GLContext.getCapabilities(); long function_pointer = caps.glWeightPointerARB; BufferChecks.checkFunctionAddress(function_pointer); GLChecks.ensureArrayVBOdisabled(caps); BufferChecks.checkDirect(pPointer); if (LWJGLUtil.CHECKS) StateTracker.getReferences(caps).ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer; nglWeightPointerARB( size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pPointer), function_pointer); }
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 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; }
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 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 void glDrawElementsInstancedBaseInstance( int mode, ShortBuffer 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_SHORT, MemoryUtil.getAddress(indices), primcount, baseinstance, function_pointer); }
public static void glCompressedTexImage1DARB( int target, int level, int internalformat, int width, int border, ByteBuffer pData) { ContextCapabilities caps = GLContext.getCapabilities(); long function_pointer = caps.glCompressedTexImage1DARB; BufferChecks.checkFunctionAddress(function_pointer); GLChecks.ensureUnpackPBOdisabled(caps); BufferChecks.checkDirect(pData); nglCompressedTexImage1DARB( target, level, internalformat, width, border, pData.remaining(), MemoryUtil.getAddress(pData), function_pointer); }
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; }
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); }
public static void glGetFramebufferAttachmentParameterOES( int target, int attachment, int pname, IntBuffer params) { BufferChecks.checkBuffer(params, 1); nglGetFramebufferAttachmentParameterivOES( target, attachment, pname, MemoryUtil.getAddress(params)); }