-
-
Save appspell/37d2d8ce1a1d799ebad4887bcb10bc3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val quadVertices: FloatBuffer | |
init { | |
// set array of Quad vertices | |
val quadVerticesData = floatArrayOf( | |
// [x,y,z, U,V] | |
-1.0f, -1.0f, 0f, 0f, 1f, | |
1.0f, -1.0f, 0f, 1f, 1f, | |
-1.0f, 1.0f, 0f, 0f, 0f, | |
1.0f, 1.0f, 0f, 1f, 0f | |
) | |
quadVertices = ByteBuffer | |
.allocateDirect(quadVerticesData.size * FLOAT_SIZE_BYTES) | |
.order(ByteOrder.nativeOrder()) | |
.asFloatBuffer() | |
.apply { | |
put(quadVerticesData).position(0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment