public IntBuffer getIntVec ( String attributeName ) { int size = getAttributeSize ( attributeName ) ; if ( size <= 0 ) { return null ; } size *= 4 * getVertexCount ( ) ; ByteBuffer buffer = ByteBuffer . allocateDirect ( size ) . order ( ByteOrder . nativeOrder ( ) ) ; IntBuffer data = buffer . asIntBuffer ( ) ; if ( ! NativeVertexBuffer . getIntVec ( getNative ( ) , attributeName , data , 0 , 0 ) ) { throw new IllegalArgumentException ( "Attribute name " + attributeName + " cannot be accessed" ) ; } return data ; }
Retrieves a vertex attribute as an integer buffer . The attribute name must be one of the attributes named in the descriptor passed to the constructor .