![]() We use 2 triangles to draw a quad with each triangle that consists of 3 indices. GLES20.glEnableVertexAttribArray(g_posHandle) DrawĪfter vertex buffer filled, texture is set and model, view, projection transformation, we need to draw quad using glDrawElements(). Both methods return handle to variable location. First parameter is program handle and second parameter is string name of variables as written in shader source code. To copy data into uniform variables or attribute variables, you need to get handle to location of that uniform or attribute using glGetUniformLocation() than glGetAttribLocation() that previously bound to program. ![]() GLES20.glGetProgramInfoLog(programHandle)) īefore you can copy data to program, make sure to activate the program by calling glUseProgram() and pass program handle that you want to make active. GLES20.glGetProgramiv(programHandle, GLES20.GL_LINK_STATUS, linkStatus, 0) get linking status final int linkStatus = new int Bind attributes if (attributes != null) ![]() ![]() GLES20.glAttachShader(programHandle, pxlShader) GLES20.glAttachShader(programHandle, vtxShader) Int programHandle=GLES20.glCreateProgram() Public static int createProgram( final int vtxShader, final int pxlShader, ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |