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


Java IntBuffer.remaining方法代码示例

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


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

示例1: glDeleteFramebuffers

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glDeleteFramebuffers(IntBuffer framebuffers) {
    org.lwjgl.opengl.ARBFramebufferObject.glDeleteFramebuffers(framebuffers);
    if (Properties.VALIDATE.enabled) {
        Context context = CURRENT_CONTEXT.get();
        int pos = framebuffers.position();
        for (int i = 0; i < framebuffers.remaining(); i++) {
            int framebuffer = framebuffers.get(pos + i);
            if (framebuffer == 0)
                continue;
            FBO fbo = context.fbos.get(framebuffer);
            if (fbo != null && fbo == context.currentFbo) {
                context.currentFbo = context.defaultFbo;
            }
            context.fbos.remove(framebuffer);
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:18,代码来源:ARBFramebufferObject.java

示例2: glDeleteBuffersARB

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glDeleteBuffersARB(IntBuffer buffers) {
    org.lwjgl.opengl.ARBVertexBufferObject.glDeleteBuffersARB(buffers);
    if (Properties.PROFILE.enabled) {
        Context ctx = CURRENT_CONTEXT.get();
        int pos = buffers.position();
        for (int i = 0; i < buffers.remaining(); i++) {
            int buffer = buffers.get(pos + i);
            BufferObject bo = ctx.bufferObjects.remove(buffer);
            Iterator<Map.Entry<Integer, BufferObject>> it = ctx.bufferObjectBindings.entrySet().iterator();
            while (it.hasNext()) {
                if (it.next().getValue() == bo) {
                    it.remove();
                }
            }
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:18,代码来源:ARBVertexBufferObject.java

示例3: glDeleteFramebuffersEXT

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glDeleteFramebuffersEXT(IntBuffer framebuffers) {
    org.lwjgl.opengl.EXTFramebufferObject.glDeleteFramebuffersEXT(framebuffers);
    if (Properties.VALIDATE.enabled) {
        Context context = CURRENT_CONTEXT.get();
        int pos = framebuffers.position();
        for (int i = 0; i < framebuffers.remaining(); i++) {
            int framebuffer = framebuffers.get(pos + i);
            if (framebuffer == 0)
                continue;
            FBO fbo = context.fbos.get(framebuffer);
            if (fbo != null && fbo == context.currentFbo) {
                context.currentFbo = context.defaultFbo;
            }
            context.fbos.remove(framebuffer);
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:18,代码来源:EXTFramebufferObject.java

示例4: glBufferStorage

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glBufferStorage(int target, IntBuffer data, int flags) {
    org.lwjgl.opengl.GL44.glBufferStorage(target, data, flags);
    if (Properties.PROFILE.enabled) {
        Context ctx = CURRENT_CONTEXT.get();
        BufferObject bo = ctx.bufferObjectBindings.get(target);
        if (bo != null) {
            bo.size = data != null ? data.remaining() << 2 : 0L;
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:11,代码来源:GL44.java

示例5: byteArrayToIntArray

import java.nio.IntBuffer; //导入方法依赖的package包/类
private int[] byteArrayToIntArray(byte[] byteArray) {
	 IntBuffer intBuf =
			   ByteBuffer.wrap(byteArray)
			     .order(ByteOrder.LITTLE_ENDIAN)
			     .asIntBuffer();
			 int[] array = new int[intBuf.remaining()];
			 intBuf.get(array);
	return array;
}
 
开发者ID:shenan4321,项目名称:BIMplatform,代码行数:10,代码来源:GeometryInfoVo.java

示例6: processIndices

import java.nio.IntBuffer; //导入方法依赖的package包/类
/**
 * Proceses the indices of a mesh.
 * 
 * @param aiMesh - AIMesh to process indices for.
 * @param indices - List of indices to add processed indices to.
 */
private static void processIndices(AIMesh aiMesh, List<Integer> indices) {
	int numFaces = aiMesh.mNumFaces();
	AIFace.Buffer aiFaces = aiMesh.mFaces();
	
	for (int i = 0; i < numFaces; i++) {
		AIFace aiFace = aiFaces.get();
		IntBuffer buffer = aiFace.mIndices();
		while (buffer.remaining() > 0) {
			indices.add(buffer.get());
		}
	}
}
 
开发者ID:brokenprogrammer,项目名称:Mass,代码行数:19,代码来源:StaticMeshLoader.java

示例7: deleteVertexArrays

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void deleteVertexArrays(IntBuffer indices) {
    Context context = CURRENT_CONTEXT.get();
    int pos = indices.position();
    for (int i = 0; i < indices.remaining(); i++) {
        int index = indices.get(pos + i);
        if (index == 0)
            continue;
        VAO vao = context.vaos.get(index);
        if (vao != null && vao == context.currentVao) {
            context.currentVao = context.defaultVao;
        }
        context.vaos.remove(index);
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:15,代码来源:Context.java

示例8: glBufferData

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glBufferData(int target, IntBuffer data, int usage) {
    org.lwjgl.opengl.GL15.glBufferData(target, data, usage);
    if (Properties.PROFILE.enabled) {
        Context ctx = CURRENT_CONTEXT.get();
        BufferObject bo = ctx.bufferObjectBindings.get(target);
        if (bo != null) {
            bo.size = data != null ? data.remaining() << 2 : 0L;
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:11,代码来源:GL15.java

示例9: glGenTextures

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glGenTextures(IntBuffer textures) {
    org.lwjgl.opengl.GL11.glGenTextures(textures);
    Context ctx = CURRENT_CONTEXT.get();
    int pos = textures.position();
    for (int i = 0; i < textures.remaining(); i++) {
        int texture = textures.get(pos + i);
        ctx.textureObjects.put(texture, new TextureObject());
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:10,代码来源:GL11.java

示例10: glGenProgramPipelines

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glGenProgramPipelines(IntBuffer pipelines) {
    org.lwjgl.opengl.GL41.glGenProgramPipelines(pipelines);
    if (Properties.VALIDATE.enabled) {
        int position = pipelines.position();
        Context context = CURRENT_CONTEXT.get();
        for (int i = 0; i < pipelines.remaining(); i++) {
            ProgramPipeline pp = new ProgramPipeline();
            context.programPipelines.put(pipelines.get(position + i), pp);
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:12,代码来源:GL41.java

示例11: glGenProgramPipelines

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glGenProgramPipelines(IntBuffer pipelines) {
    org.lwjgl.opengl.ARBSeparateShaderObjects.glGenProgramPipelines(pipelines);
    if (Properties.VALIDATE.enabled) {
        int position = pipelines.position();
        Context context = CURRENT_CONTEXT.get();
        for (int i = 0; i < pipelines.remaining(); i++) {
            ProgramPipeline pp = new ProgramPipeline();
            context.programPipelines.put(pipelines.get(position + i), pp);
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:12,代码来源:ARBSeparateShaderObjects.java

示例12: glGenVertexArrays

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glGenVertexArrays(IntBuffer arrays) {
    org.lwjgl.opengl.GL30.glGenVertexArrays(arrays);
    if (Properties.VALIDATE.enabled) {
        Context context = CURRENT_CONTEXT.get();
        int position = arrays.position();
        for (int i = 0; i < arrays.remaining(); i++) {
            VAO vao = new VAO(context.GL_MAX_VERTEX_ATTRIBS);
            context.vaos.put(arrays.get(position + i), vao);
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:12,代码来源:GL30.java

示例13: glGenFramebuffers

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glGenFramebuffers(IntBuffer framebuffers) {
    org.lwjgl.opengl.GL30.glGenFramebuffers(framebuffers);
    if (Properties.VALIDATE.enabled) {
        Context ctx = CURRENT_CONTEXT.get();
        int pos = framebuffers.position();
        for (int i = 0; i < framebuffers.remaining(); i++) {
            int handle = framebuffers.get(pos + i);
            FBO fbo = new FBO(handle);
            ctx.fbos.put(handle, fbo);
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:13,代码来源:GL30.java

示例14: glGenVertexArrays

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static void glGenVertexArrays(IntBuffer arrays) {
    org.lwjgl.opengl.ARBVertexArrayObject.glGenVertexArrays(arrays);
    if (Properties.VALIDATE.enabled) {
        Context context = CURRENT_CONTEXT.get();
        int position = arrays.position();
        for (int i = 0; i < arrays.remaining(); i++) {
            VAO vao = new VAO(context.GL_MAX_VERTEX_ATTRIBS);
            context.vaos.put(arrays.get(position + i), vao);
        }
    }
}
 
开发者ID:LWJGLX,项目名称:debug,代码行数:12,代码来源:ARBVertexArrayObject.java

示例15: ConvertToIntArray

import java.nio.IntBuffer; //导入方法依赖的package包/类
public static int[] ConvertToIntArray(byte[] input){
    IntBuffer intBuf =
            ByteBuffer.wrap(input)
                    .order(ByteOrder.BIG_ENDIAN)
                    .asIntBuffer();
    int[] output = new int[intBuf.remaining()];
    intBuf.get(output);
    return output;
}
 
开发者ID:dmtan90,项目名称:Sense-Hub-Android-Things,代码行数:10,代码来源:PacketData.java


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