当前位置: 首页>>代码示例>>Java>>正文


Java PointerBuffer.limit方法代码示例

本文整理汇总了Java中org.lwjgl.PointerBuffer.limit方法的典型用法代码示例。如果您正苦于以下问题:Java PointerBuffer.limit方法的具体用法?Java PointerBuffer.limit怎么用?Java PointerBuffer.limit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.lwjgl.PointerBuffer的用法示例。


在下文中一共展示了PointerBuffer.limit方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printBuffer

import org.lwjgl.PointerBuffer; //导入方法依赖的package包/类
private String printBuffer(PointerBuffer buffer) {
    long address = MemoryUtil.memAddress0(buffer);
    int pos = buffer.position();
    int lim = buffer.limit();
    int cap = buffer.capacity();
    if (pos == 0 && lim == cap)
        return "PointerBuffer[0x" + Long.toString(address, 16) + ", " + lim + "]";
    else
        return "PointerBuffer[0x" + Long.toString(address, 16) + ", " + pos + ", " + lim + ", " + cap + "]";
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:11,代码来源:MethodCall.java

示例2: create

import org.lwjgl.PointerBuffer; //导入方法依赖的package包/类
public static void create()
{
	PointerBuffer displayPointers = glfwGetMonitors();
	Display.displays = new ArrayList<>();
	
	for(int i = 0; i < displayPointers.limit(); i++)
	{
		long id = displayPointers.get(i);
		Display.displays.add(new Display(id));
	}
	
	glfwSetMonitorCallback(new DisplayCallback());
}
 
开发者ID:Snakybo,项目名称:TorchEngine,代码行数:14,代码来源:DisplayController.java

示例3: registerCLKernels

import org.lwjgl.PointerBuffer; //导入方法依赖的package包/类
/**
 * Called from clCreateKernelsInProgram to register new CLKernels.
 *
 * @param kernels a buffer containing CLKernel pointers.
 */
void registerCLKernels(final PointerBuffer kernels) {
	for ( int i = kernels.position(); i < kernels.limit(); i++ ) {
		final long pointer = kernels.get(i);
		if ( pointer != 0 )
			new CLKernel(pointer, this);
	}
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:13,代码来源:CLProgram.java

示例4: registerSubCLDevices

import org.lwjgl.PointerBuffer; //导入方法依赖的package包/类
/**
 * Called from clCreateSubDevicesEXT to register new sub-devices.
 *
 * @param devices a buffer containing CLDevice pointers.
 */
void registerSubCLDevices(final PointerBuffer devices) {
	for ( int i = devices.position(); i < devices.limit(); i++ ) {
		final long pointer = devices.get(i);
		if ( pointer != 0 )
			new CLDevice(pointer, this);
	}
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:13,代码来源:CLDevice.java

示例5: getMonitors

import org.lwjgl.PointerBuffer; //导入方法依赖的package包/类
@Override
public IMonitor[] getMonitors() {
	PointerBuffer monitors = GLFW.glfwGetMonitors();
	IMonitor[] result = new IMonitor[monitors.limit()];
	for(int i = 0; i < result.length; i++)
		result[i] = new GLFWMonitor(monitors.get(i), i);
	return result;
}
 
开发者ID:arisona,项目名称:ether,代码行数:9,代码来源:GLFWPlatform.java

示例6: getSizesBuffer

import org.lwjgl.PointerBuffer; //导入方法依赖的package包/类
protected PointerBuffer getSizesBuffer(final T object, final int param_name) {
	final int size = getInfoSizeArraySize(object, param_name);

	final PointerBuffer buffer = APIUtil.getBufferPointer(size);
	buffer.limit(size);

	getInfo(object, param_name, buffer.getBuffer(), null);

	return buffer;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:11,代码来源:InfoUtilAbstract.java


注:本文中的org.lwjgl.PointerBuffer.limit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。