-
-
Save appspell/8b6ac1394928b143a97a5dc27bafc7ad 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 const val FLOAT_SIZE_BYTES = 4 // size of Float | |
private const val TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES // 5 floats for each vertex (3 floats is a position and 2 texture coordinate) | |
private const val TRIANGLE_VERTICES_DATA_POS_OFFSET = 0 // position coordinates start from the starts from the start of array of each vertex | |
private const val TRIANGLE_VERTICES_DATA_UV_OFFSET = 3 // texture coordinates start from 3rd float (4th and 5th float) | |
// vertex shader attributes | |
const val VERTEX_SHADER_IN_POSITION = "inPosition" | |
const val VERTEX_SHADER_IN_TEXTURE_COORD = "inTextureCoord" | |
const val VERTEX_SHADER_UNIFORM_MATRIX_MVP = "uMVPMatrix" | |
const val VERTEX_SHADER_UNIFORM_MATRIX_STM = "uSTMatrix" | |
const val FRAGMENT_SHADER_UNIFORM_MY_UNIFORM = "uMyUniform" | |
private const val UNKNOWN_PROGRAM = -1 | |
private const val UNKNOWN_ATTRIBUTE = -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment