Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int[] verts = {
- 0, 0, 0,
- viewWidth, 0, 0,
- viewWidth, viewHeight / 2, 0,
- 0, 0, 0,
- 0, viewHeight / 2, 0,
- viewWidth, viewHeight / 2, 0
- };
- int[] uv = {
- 0, 0,
- 255, 0,
- 255, 255,
- 0, 0,
- 0, 255,
- 255, 255
- };
- int color = ((128 << 16) | (128 << 8) | 128);
- int[] colors = {
- color, color, color
- };
- Effect3D ef = new Effect3D();
- affineMatrix.setIdentity();
- matrix.setAffineTrans(affineMatrix);
- matrix.setCenter(0, 0);
- matrix.setParallelSize(viewWidth, viewHeight);
- g3d.renderPrimitives(tex.nativeHandle, 0, 0, matrix, ef, Graphics3D.PRIMITVE_TRIANGLES | Graphics3D.PDATA_TEXURE_COORD, 2, verts, verts, uv, verts);
- g3d.flush();
- affineMatrix.setIdentity();
- matrix.setAffineTrans(affineMatrix);
- matrix.setCenter(0, viewHeight / 2);
- matrix.setParallelSize(viewWidth, viewHeight);
- g3d.renderPrimitives(tex.nativeHandle, 0, 0, matrix, ef, Graphics3D.PRIMITVE_TRIANGLES | Graphics3D.PDATA_COLOR_PER_FACE, 2, verts, verts, uv, colors);
- g3d.flush();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement