示例#1
0
    void BufferedPrimitiveRenderer::DrawWirePyramid(const Vector3f& position,
                                                F32 edge,
                                                const Color& color /*= DefaultColor*/,
                                                DebugLifespan::Enum lifespan /*= DebugLifespan::Temporary*/,
                                                bool depthEnabled /*= false*/,
                                                bool antiAliased /*= false*/) {

        Matrix transform = Matrix::CreateScale(edge) * Matrix::CreateTranslation(position);
        DrawWirePyramid(transform, color, lifespan, depthEnabled, antiAliased);
    }
//这里进行所有的绘图工作
void SceneShow(GLvoid)        
{
	glClear(GL_COLOR_BUFFER_BIT);
	glColor3f(1.0, 0.0, 0.0);

	glPushMatrix();
	DrawCoordinate();
	DrawWirePyramid(0.5);
	glPopMatrix();

	glRotatef(1.0, 0.0, 1.0, 0.0);

	glFlush();
}