I am trying to render a texture that was generated by the camera on the iPhone screen. I downloaded the color tracking example from Brad Larson on http://www.sunsetlakesoftware.com/2010/10/22/gpu-accelerated-video-processing-mac-and-ios (direct link for sample code: http://www.sunsetlakesoftware.com/sites/default/files/ColorTracking.zip).
In the ColorTrackingViewController 他使用以下代码制造透镜和相应的文本坐标,使案文为正体:
static const GLfloat squareVertices[] = {
-1.0f, -1.0f,
1.0f, -1.0f,
-1.0f, 1.0f,
1.0f, 1.0f,
};
static const GLfloat textureVertices[] = {
1.0f, 1.0f,
1.0f, 0.0f,
0.0f, 1.0f,
0.0f, 0.0f,
};
我不理解为什么这些案文正确协调工作。
我认为,在另一个例子中,我看到,这项工作也正确,应当:
static const GLfloat textureVertices[] = {
0.0f, 1.0f,
1.0f, 1.0f,
0.0f, 0.0f,
1.0f, 0.0f,
};
我通过了整个法典,但我无法说明上述案文如何正确协调工作。 我失踪了什么?