![]() You can see that we explicitly want to have index 0 for color output buffer, and index 1 for texture coordinate output buffer.īut all the attributes and uniforms are queried dynamically - index returned needs to be used with glVertexAttribPointer and glUniform* functions. ![]() GLuint aTexLocation = glGetAttribLocation(prog, "aTex") GLuint aPosLocation = glGetAttribLocation(prog, "aPos") ![]() GLuint sTexLocation = glGetUniformLocation(prog, "sTex") GLuint uTexTransformLoGLuint aPosLocation = glGetUniformLocation(prog, "aPos") GLuint uPosTransformLocation = glGetUniformLocation(prog, "uPosTransform") GlBindFragDataLocation(prog, 0, "oColor") before linking we bind output locations to specific indexes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |