Package java.nio

Examples of java.nio.IntBuffer.remaining()


        buf.put((char) c);
    }

    private void addSeparator() {
        IntBuffer buf = cellBeginPositions;
        if (buf.remaining() == 0) {
            IntBuffer newBuf = IntBuffer.allocate(buf.capacity() * 2);
            newBuf.clear();
            buf.flip();
            newBuf.put(buf);
            buf = newBuf;
View Full Code Here


            if (i != null && i != 0) {
                idBuffer.put(i);
            }
        }
        idBuffer.flip();
        if (idBuffer.remaining() > 0) {
            ARBBufferObject.glDeleteBuffersARB(idBuffer);
        }
    }

    public void deleteDisplayLists(final Collection<Integer> ids) {
View Full Code Here

                idBuffer.put(i);
                record.removeTextureRecord(i);
            }
        }
        idBuffer.flip();
        if (idBuffer.remaining() > 0) {
            GL11.glDeleteTextures(idBuffer);
        }
    }

    /**
 
View Full Code Here

                    while (input.read(buffer) > 0) {
                        ;
                    }
                    buffer.flip();
                    IntBuffer ibuffer = buffer.asIntBuffer();
                    int ibuffRemain = Math.min(ibuffer.remaining(), countIDs);
                    ibuffer.get(streams, 0, ibuffRemain);
                    for (int i = 0; i < ibuffRemain; i++) {
                        if (streams[i] == meta.streamID) {
                            offsetFound = offset + i + 1;
                            //TODO break and seek ahead based on countIDs
View Full Code Here

            in_bb.getInt();
            int fplen = in_bb.getInt();
            IntBuffer ib = in_bb.asIntBuffer();
            int[] ep = new int[fplen];
            ib.get(ep, 0, fplen);
            int[] fp = new int[ib.remaining()];
            ib.get(fp);
            int sz = fp.length * ep.length * Float.SIZE/8;
            out_bb.putInt(sz);
            for (int e : ep)
              for (int f : fp)
View Full Code Here

        data.setIndices(finalIndices);
        final int[] sectionCounts = new int[sections.size()];
        for (int i = 0; i < sectionCounts.length; i++) {
            final IntBuffer ib = sections.get(i);
            ib.rewind();
            sectionCounts[i] = ib.remaining();
            while (ib.hasRemaining()) {
                finalIndices.put(ib.get());
            }
        }
View Full Code Here

            if (i != null && i != 0) {
                idBuffer.put(i);
            }
        }
        idBuffer.flip();
        if (idBuffer.remaining() > 0) {
            gl.glDeleteBuffers(idBuffer.remaining(), idBuffer);
        }
    }

    public void deleteDisplayLists(final Collection<Integer> ids) {
View Full Code Here

                idBuffer.put(i);
            }
        }
        idBuffer.flip();
        if (idBuffer.remaining() > 0) {
            gl.glDeleteBuffers(idBuffer.remaining(), idBuffer);
        }
    }

    public void deleteDisplayLists(final Collection<Integer> ids) {
        final GL gl = GLContext.getCurrentGL();
View Full Code Here

                idBuffer.put(i);
                record.removeTextureRecord(i);
            }
        }
        idBuffer.flip();
        if (idBuffer.remaining() > 0) {
            gl.glDeleteTextures(idBuffer.remaining(), idBuffer);
        }
    }

    /**
 
View Full Code Here

                record.removeTextureRecord(i);
            }
        }
        idBuffer.flip();
        if (idBuffer.remaining() > 0) {
            gl.glDeleteTextures(idBuffer.remaining(), idBuffer);
        }
    }

    /**
     * Useful for external jogl based classes that need to safely set the current texture.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.