Skip to content

Instantly share code, notes, and snippets.

Created Mar 4, 2021
What would you like to do?
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)
.apply {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment