float pfIdentity[] =
{
-1.0f,0.0f,0.0f,0.0f,
0.0f,1.0f,0.0f,0.0f,
0.0f,0.0f,1.0f,0.0f,
0.0f,0.0f,0.0f,1.0f
};
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
const char* pszVertShader = "
attribute highp vec4 myVertex;
uniform mediump mat4 myPMVMatrix;
invariant gl_Position;
void main(void)
{
gl_Position = myPMVMatrix * myVertex;
}";
================================================================================================================================================================================================================================================================
for(int i = 0; i < 80000; ++i)
{
glClear(GL_COLOR_BUFFER_BIT);
int i32Location = glGetUniformLocation(uiProgramObject, "myPMVMatrix");
glUniformMatrix4fv( i32Location, 1, GL_FALSE, pfIdentity);
glEnableVertexAttribArray(VERTEX_ARRAY);
glVertexAttribPointer(VERTEX_ARRAY, 3, GL_FLOAT, GL_FALSE, 0, 0);
glDrawArrays(GL_TRIANGLES, 0,i);
eglSwapBuffers(eglDisplay, eglSurface);
}
return 0;
}
p.s : i 正在Bubuntu 10.10中与Kronos头盔进行开关,后者是开放式电筒2.0。