Best code examples for Java 8 IntBuffer class (java.nio.IntBuffer)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 IntBuffer class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 IntBuffer examples from Open Source projects
This code example shows how to use the following methods: position
200:	vertices.position(0);                        // Set Vertex Buffer to Position 
201:	gl.glVertexPointer(positionCnt, GL10.GL_FLOAT, vertexSize, vertices);  // Set Vertex Pointer 
-
205:	vertices.position(positionCnt);            // Set Vertex Buffer to Color 
206:	gl.glColorPointer(COLOR_CNT, GL10.GL_FLOAT, vertexSize, vertices);  // Set Color Pointer 
-
211:	vertices.position(positionCnt + (hasColor ? COLOR_CNT : 0));  // Set Vertex Buffer to Texture Coords (NOTE: position based on whether color is also specified) 
212:	gl.glTexCoordPointer(TEXCOORD_CNT, GL10.GL_FLOAT, vertexSize, vertices);  // Set Texture Coords Pointer 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: capacity, limit, position, get
205:	buffer.position(0); 
206:	buffer.limit(buffer.capacity()); 
207:	Gdx.gl.glGenTextures(1, buffer); 
208:	return buffer.get(0); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: get, put
35:	intBuffer.put(source, 2, 2); 
36:	intBuffer.put(source, 4, 2); 
37:	assertEquals(4, intBuffer.get(0)); 
38:	assertEquals(5, intBuffer.get(1)); 
39:	assertEquals(6, intBuffer.get(2)); 
40:	assertEquals(7, intBuffer.get(3)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: position, put
210:	mTexcoordBuffer.put(texcoords); 
211:	mTexcoordBuffer.position(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: put
167:	coord_buffer.put(0, (int)accum_dx); 
168:	coord_buffer.put(1, (int)accum_dy); 
-
170:	coord_buffer.put(0, (int)last_x); 
171:	coord_buffer.put(1, (int)last_y); 
-
173:	coord_buffer.put(2, accum_dz); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, put
75:	vertexBuffer.position(index * 3); 
-
78:	vertexBuffer.put(toFixed(x)); 
79:	vertexBuffer.put(toFixed(y)); 
80:	vertexBuffer.put(toFixed(z)); 
-
84:	vertexBuffer.put(toFixed(temp.x)); 
85:	vertexBuffer.put(toFixed(temp.y)); 
86:	vertexBuffer.put(toFixed(temp.z)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get
89:	Gdx.gl20.glGenBuffers(1, tmpHandle); 
90:	return tmpHandle.get(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, put
81:	mColorBuffer.put(colors); 
82:	mColorBuffer.position(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: put
147:	coord_buffer.put(0, accum_dx); 
148:	coord_buffer.put(1, accum_dy); 
-
150:	coord_buffer.put(0, last_x); 
151:	coord_buffer.put(1, last_y); 
-
153:	coord_buffer.put(2, accum_dz); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get
129:	gl.glGenTextures(1, tmp); 
-
131:	return tmp.get(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
35:	intBuffer.put(source, 2, 2); 
36:	intBuffer.put(source, 4, 2); 
37:	assertEquals(4, intBuffer.get(0)); 
38:	assertEquals(5, intBuffer.get(1)); 
39:	assertEquals(6, intBuffer.get(2)); 
40:	assertEquals(7, intBuffer.get(3)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, put
81:	mColorBuffer.put(colors); 
82:	mColorBuffer.position(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, remaining, put
51:	field_1236_g.put(par1); 
-
53:	if (field_1236_g.remaining() == 0) 
-
68:	field_1236_g.flip(); 
-
72:	if (field_1236_g.remaining() > 0) 
-
76:	GL11.glCallLists(field_1236_g); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, remaining
175:	zeroBuffer0(b, b.position()*4L, b.remaining()*4L); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get
150:	GL11.glGenTextures(tmp); 
-
152:	return tmp.get(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
60:	vertices.position(0); 
61:	gl.glVertexPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
65:	vertices.position(2); 
66:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
71:	vertices.position(hasColor?6:2); 
72:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
200:	vertices.position(0);                        // Set Vertex Buffer to Position 
201:	gl.glVertexPointer(positionCnt, GL10.GL_FLOAT, vertexSize, vertices);  // Set Vertex Pointer 
-
205:	vertices.position(positionCnt);            // Set Vertex Buffer to Color 
206:	gl.glColorPointer(COLOR_CNT, GL10.GL_FLOAT, vertexSize, vertices);  // Set Color Pointer 
-
211:	vertices.position(positionCnt + (hasColor ? COLOR_CNT : 0));  // Set Vertex Buffer to Texture Coords (NOTE: position based on whether color is also specified) 
212:	gl.glTexCoordPointer(TEXCOORD_CNT, GL10.GL_FLOAT, vertexSize, vertices);  // Set Texture Coords Pointer 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, remaining, put
51:	field_1236_g.put(par1); 
-
53:	if (field_1236_g.remaining() == 0) 
-
68:	field_1236_g.flip(); 
-
72:	if (field_1236_g.remaining() > 0) 
-
76:	GL11.glCallLists(field_1236_g); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
60:	vertices.position(0); 
61:	gl.glVertexPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
65:	vertices.position(2); 
66:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
71:	vertices.position(hasColor?6:2); 
72:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, get
595:	final int vPos = viewport.position(); 
596:	gl.glTranslatef((viewport.get(2+vPos) - 2 * (x - viewport.get(0+vPos))) / deltaX, 
597:	(viewport.get(3+vPos) - 2 * (y - viewport.get(1+vPos))) / deltaY, 
-
599:	gl.glScalef(viewport.get(2) / deltaX, viewport.get(3) / deltaY, 1.0f); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasRemaining, limit, position, remaining, get
123:	if (remaining == 0 && !tb.hasRemaining()) 
-
129:	while (tb.remaining() < len) 
-
131:	int nr = tb.remaining(); 
132:	tb.get(dst, pos, nr); 
-
139:	tb.get(dst, pos, len); 
-
155:	if (relIndex < 0 || relIndex >= tb.limit()) 
-
164:	tb.position(relIndex); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get
160:	if (inptr.get(DCTSIZE * 1) == 0 && inptr.get(DCTSIZE * 2) == 0 
161:	&& inptr.get(DCTSIZE * 3) == 0 && inptr.get(DCTSIZE * 4) == 0 
162:	&& inptr.get(DCTSIZE * 5) == 0 && inptr.get(DCTSIZE * 6) == 0 
163:	&& inptr.get(DCTSIZE * 7) == 0) { 
-
165:	int dcval = inptr.get(DCTSIZE * 0) << PASS1_BITS; 
-
176:	inptr = advance(inptr); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, put
254:	texBuf.put(textureID); 
255:	texBuf.flip(); 
-
257:	GL.glDeleteTextures(texBuf); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get
352:	GL20.glGetProgramInfoLog(program, intBuffer, buffer); 
353:	int numBytes = intBuffer.get(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: limit, position, remaining, isDirect, order
185:	if (!buffer.isDirect()) 
-
266:	direct_buffer.limit(buffer.limit()); 
267:	direct_buffer.position(buffer.position()); 
-
337:	CachedBuffers buffers = getCachedBuffers(buffer.remaining()*4); 
338:	return buffer.order() == ByteOrder.LITTLE_ENDIAN ? buffers.int_buffer_little : buffers.int_buffer_big; 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
60:	vertices.position(0); 
61:	gl.glVertexPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
65:	vertices.position(2); 
66:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
71:	vertices.position(hasColor?6:2); 
72:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
63:	vertices.position(0); 
64:	gl.glVertexPointer(3, GL10.GL_FLOAT, vertexSize, vertices); 
-
68:	vertices.position(3); 
69:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
74:	vertices.position(hasColor ? 7 : 3); 
75:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
85:	vertices.position(offset); 
86:	gl.glNormalPointer(GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, put
66:	coords.position(offset); 
-
68:	coords.put(x_min); 
69:	coords.put(y_min); 
-
71:	coords.put(x_min); 
72:	coords.put(y_max); 
-
74:	coords.put(x_max); 
75:	coords.put(y_min); 
-
77:	coords.put(x_max); 
78:	coords.put(y_max); 
-
80:	coords.position(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, put
202:	mVertexBuffer.put(vertices); 
203:	mVertexBuffer.position(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: capacity, clear, asReadOnlyBuffer, duplicate, hashCode
374:	buf.clear(); 
375:	IntBuffer readonly = buf.asReadOnlyBuffer(); 
376:	IntBuffer duplicate = buf.duplicate(); 
377:	assertTrue(buf.hashCode() == readonly.hashCode()); 
-
379:	assertTrue(buf.capacity() > 5); 
380:	duplicate.position(buf.capacity() / 2); 
381:	assertTrue(buf.hashCode() != duplicate.hashCode()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: put
84:	headerBuffer.put(0, HEADER); 
85:	headerBuffer.put(1, rowIndex); 
86:	headerBuffer.put(2, colVals.length); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
60:	vertices.position(0); 
61:	gl.glVertexPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
65:	vertices.position(2); 
66:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
71:	vertices.position(hasColor?6:2); 
72:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
62:	vertices.position(0); 
63:	gl.glVertexPointer(3, GL10.GL_FLOAT, vertexSize, vertices); 
-
67:	vertices.position(3); 
68:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
73:	vertices.position(hasColor ? 7 : 3); 
74:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
84:	vertices.position(offset); 
85:	gl.glNormalPointer(GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, put
75:	vertexBuffer.position(index * 3); 
-
78:	vertexBuffer.put(toFixed(x)); 
79:	vertexBuffer.put(toFixed(y)); 
80:	vertexBuffer.put(toFixed(z)); 
-
84:	vertexBuffer.put(toFixed(temp.x)); 
85:	vertexBuffer.put(toFixed(temp.y)); 
86:	vertexBuffer.put(toFixed(temp.z)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: glVertexAttribPointer, position
110:	vertices.position( 0 );                         // Set Vertex Buffer to Position 
111:	GLES20.glVertexAttribPointer(mPositionHandle, positionCnt, 
-
116:	vertices.position(positionCnt);  // Set Vertex Buffer to Texture Coords (NOTE: position based on whether color is also specified) 
117:	GLES20.glVertexAttribPointer(mTextureCoordinateHandle, TEXCOORD_CNT, 
-
122:	vertices.position(positionCnt + TEXCOORD_CNT); 
123:	GLES20.glVertexAttribPointer(mMVPIndexHandle, MVP_MATRIX_INDEX_CNT, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
60:	vertices.position(0); 
61:	gl.glVertexPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
65:	vertices.position(2); 
66:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
71:	vertices.position(hasColor?6:2); 
72:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, remaining, put
33:	this.field_110307_g.put(var1); 
34:	if(this.field_110307_g.remaining() == 0) { 
-
43:	this.field_110307_g.flip(); 
-
47:	if(this.field_110307_g.remaining() > 0) { 
-
50:	GL11.glCallLists(this.field_110307_g); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
64:	vertices.position(0); 
65:	gl.glVertexPointer(3, GL10.GL_FLOAT, vertexSize, vertices); 
-
69:	vertices.position(3); 
70:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
75:	vertices.position(hasColor ? 7 : 3); 
76:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
86:	vertices.position(offset); 
87:	gl.glNormalPointer(GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position, put
81:	mColorBuffer.put(colors); 
82:	mColorBuffer.position(0); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: array
87:	.createBitmap(data.array(), size.width, size.height, Config.ARGB_8888); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, remaining, put
39:	this.field_78424_g.put(p_78420_1_); 
40:	if(this.field_78424_g.remaining() == 0) { 
-
49:	this.field_78424_g.flip(); 
-
53:	if(this.field_78424_g.remaining() > 0) { 
-
56:	GL11.glCallLists(this.field_78424_g); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
64:	vertices.position(0); 
65:	gl.glVertexPointer(3, GL10.GL_FLOAT, vertexSize, vertices); 
-
69:	vertices.position(3); 
70:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
75:	vertices.position(hasColor ? 7 : 3); 
76:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
86:	vertices.position(offset); 
87:	gl.glNormalPointer(GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, remaining, put
42:	g.put(j); 
43:	if(g.remaining() == 0) 
-
53:	g.flip(); 
-
56:	if(g.remaining() > 0) 
-
60:	GL11.glCallLists(g); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, remaining, put
43:	g.put(j); 
44:	if(g.remaining() == 0) 
-
54:	g.flip(); 
-
57:	if(g.remaining() > 0) 
-
61:	GL11.glCallLists(g); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: position
76:	vertices.position(0); 
77:	gl.glVertexPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
-
81:	vertices.position(2); 
82:	gl.glColorPointer(4, GL10.GL_FLOAT, vertexSize, vertices); 
-
87:	vertices.position(hasColor?6:2); 
88:	gl.glTexCoordPointer(2, GL10.GL_FLOAT, vertexSize, vertices); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: flip, remaining, put
51:	field_1236_g.put(par1); 
-
53:	if (field_1236_g.remaining() == 0) 
-
68:	field_1236_g.flip(); 
-
72:	if (field_1236_g.remaining() > 0) 
-
76:	GL11.glCallLists(field_1236_g); 
Full Snippet Info
6
CodeRank
Related Java 8 IntBuffer Questions & Answers:
See Code Examples for Java 8 IntBuffer Methods: