Package java.nio

Examples of java.nio.IntBuffer.flip()


   * @see org.newdawn.slick.opengl.Texture#release()
   */
    public void release() {
        IntBuffer texBuf = createIntBuffer(1);
        texBuf.put(textureID);
        texBuf.flip();
       
      GL.glDeleteTextures(texBuf);
     
        if (lastBind == this) {
          bindNone();
View Full Code Here


    glGetObjectParameterARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);

    int length = iVal.get();
    if (length > 1) {
      ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
      iVal.flip();
      glGetInfoLogARB(obj, iVal, infoLog);
      byte[] infoBytes = new byte[length];
      infoLog.get(infoBytes);
      String out = new String(infoBytes);
      System.out.println("Info log:\n" + out);
View Full Code Here

            if (i != null) {
                idBuffer.put(i);
                record.removeTextureRecord(i);
            }
        }
        idBuffer.flip();
        if (idBuffer.remaining() > 0) {
            GL11.glDeleteTextures(idBuffer);
        }
    }
View Full Code Here

            gb.put ( iga );
        }
        if ( lga != null ) {
            gb.put ( lga );
        }
        gb.flip();
        return gb;
    }

    /**
     * Concatenante association arrays.
View Full Code Here

        }
        for ( int i = position + count, n = nig; i < n; i++ ) {
            gb.put ( igs.getGlyph ( i ) );
            al.add ( igs.getAssociation ( i ) );
        }
        gb.flip();
        if ( igs.compareGlyphs ( gb ) != 0 ) {
            this.igs = new GlyphSequence ( igs.getCharacters(), gb, al );
            this.indexLast = gb.limit();
            return true;
        } else {
View Full Code Here

            }
            cb.put ( cc );
            gb.put ( gi );
        }
        cb.flip();
        gb.flip();
        return new GlyphSequence ( cb, gb, null );
    }

    /**
     * Map sequence GS, comprising a sequence of Glyph Indices, to output sequence CS,
View Full Code Here

        glGetObjectParameterARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);

        int length = iVal.get();
        if (length > 1) {
            ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
            iVal.flip();
            glGetInfoLogARB(obj, iVal, infoLog);
            byte[] infoBytes = new byte[length];
            infoLog.get(infoBytes);
            String out = new String(infoBytes);
            System.out.println("Info log:\n" + out);
View Full Code Here

    int length = iVal.get();
    if (length > 1) {
      System.out.println();
      ByteBuffer infoLog = Utils.allocByteBuffer(length);
      iVal.flip();
      ARBShaderObjects.glGetInfoLogARB(obj, iVal, infoLog);
      byte[] infoBytes = new byte[length];
      infoLog.get(infoBytes);
      String out = new String(infoBytes);
      System.out.println("Info log: " + name + "\n" + out);
View Full Code Here

      attachments[i] = COLOR_ATTACHMENTS[i];
    }

    IntBuffer buffer = BufferUtils.createIntBuffer(textures.length);
    buffer.put(attachments);
    buffer.flip();

    GL20.glDrawBuffers(buffer);

    int status = GL30.glCheckFramebufferStatus(GL30.GL_FRAMEBUFFER);
   
View Full Code Here

      indexArray[i] = (f != null ? f : 0);
    }

    indices = BufferUtils.createIntBuffer(indexArray.length);
    indices.put(indexArray);
    indices.flip();
   
    currentMesh.numberOfIndices = indices.capacity();

    float[] textureArray = new float[textureList.size()];
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.