OpenGL ES/Triangle/Triangle/main.cpp
///////////////////////////////////////////////////////////////////////////////
// This function does any needed initialization on the rendering context.
// This is the first opportunity to do any OpenGL related tasks.
This function does any needed initialization on the rendering context.
This is the first opportunity to do any OpenGL related tasks.
This function does any needed initialization on the rendering context . This is the first opportunity to do any OpenGL related tasks .
void SetupRC() {
    glClearColor(0.0f, 0.0f, 0.0f, 1.0f );
    shaderManager.InitializeStockShaders();
    GLfloat vVerts[] = { -0.5f, 0.0f, 0.0f,
                          0.5f, 0.0f, 0.0f,
                          0.0f, 0.5f, 0.0f };
    triangleBatch.Begin(GL_TRIANGLES, 3);
    triangleBatch.CopyVertexData3f(vVerts);
    triangleBatch.End();
}
void SetupRC ( ) { glClearColor ( 0.0f , 0.0f , 0.0f , 1.0f ) ; shaderManager . InitializeStockShaders ( ) ; GLfloat vVerts [ ] = { -0.5f , 0.0f , 0.0f , 0.5f , 0.0f , 0.0f , 0.0f , 0.5f , 0.0f } ; triangleBatch . Begin ( GL_TRIANGLES , 3 ) ; triangleBatch . CopyVertexData3f ( vVerts ) ; triangleBatch . End ( ) ; }
This function does any needed initialization on the rendering context.
This function does any needed initialization on the rendering context .
// Blue background // 初始化着色器 // 三角形顶点