Lines Matching defs:UserData
40 } UserData;
47 UserData *userData = esContext->userData;
64 userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
67 userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
70 userData->mvpLoc = glGetUniformLocation( userData->programObject, "u_mvpMatrix" );
73 userData->numIndices = esGenCube( 1.0, &userData->vertices,
74 NULL, NULL, &userData->indices );
77 userData->angle = 45.0f;
89 UserData *userData = (UserData*) esContext->userData;
95 userData->angle += ( deltaTime * 40.0f );
96 if( userData->angle >= 360.0f )
97 userData->angle -= 360.0f;
113 esRotate( &modelview, userData->angle, 1.0, 0.0, 1.0 );
117 esMatrixMultiply( &userData->mvpMatrix, &modelview, &perspective );
125 UserData *userData = esContext->userData;
135 glUseProgram ( userData->programObject );
138 glVertexAttribPointer ( userData->positionLoc, 3, GL_FLOAT,
139 GL_FALSE, 3 * sizeof(GLfloat), userData->vertices );
141 glEnableVertexAttribArray ( userData->positionLoc );
145 glUniformMatrix4fv( userData->mvpLoc, 1, GL_FALSE, (GLfloat*) &userData->mvpMatrix.m[0][0] );
148 glDrawElements ( GL_TRIANGLES, userData->numIndices, GL_UNSIGNED_SHORT, userData->indices );
158 UserData *userData = esContext->userData;
160 if ( userData->vertices != NULL )
162 free ( userData->vertices );
165 if ( userData->indices != NULL )
167 free ( userData->indices );
171 glDeleteProgram ( userData->programObject );
178 UserData userData;
181 esContext.userData = &userData;