|
龙书第83页,即源代码中:Triangle.cpp
//
// Fill the buffers with the triangle data.
//
Vertex* vertices;
Triangle->Lock(0, 0, (void**)&vertices, 0);
vertices[0] = Vertex(-1.0f, 0.0f, 2.0f); //为什么值只有(-1,1)的范围,三角形会这么大?
vertices[1] = Vertex( 0.0f, 1.0f, 2.0f);
vertices[2] = Vertex( 1.0f, 0.0f, 2.0f);
Triangle->Unlock();
|
|