Add 3D projection

FossilOrigin-Name: b55b31d1bbac4d060b641f5c9bc0407cc4f5f11ef64d5c4f28b80d6934fe318f
This commit is contained in:
Jonathan Schleifer 2023-02-19 22:28:31 +00:00
parent 48bd210714
commit 6fbc6d0c1c
2 changed files with 14 additions and 10 deletions

View file

@ -32,9 +32,9 @@ OF_APPLICATION_DELEGATE(TestsAppDelegate)
options: nil] autorelease];
const O3DVertex outerTriangle[] = {
{{ -1, -1, 1 }, { 1, 0, 0 }},
{{ 0, 1, 1 }, { 0, 1, 0 }},
{{ 1, -1, 1 }, { 0, 0, 1 }}
{{ -1, -1, 0 }, { 1, 0, 0 }},
{{ 0, 1, 0 }, { 0, 1, 0 }},
{{ 1, -1, 0 }, { 0, 0, 1 }}
};
const O3DVertex innerTriangle[] = {
{{ -0.5, 0.5, 0 }, { 1, 1, 0 }},
@ -45,8 +45,8 @@ OF_APPLICATION_DELEGATE(TestsAppDelegate)
OFDate *startDate = [OFDate date];
while (-startDate.timeIntervalSinceNow < 5) {
[renderer beginFrame];
[renderer drawPolygonWithVertices: innerTriangle count: 3];
[renderer drawPolygonWithVertices: outerTriangle count: 3];
[renderer drawPolygonWithVertices: innerTriangle count: 3];
[renderer endFrame];
}