Minor optimisation
This commit is contained in:
parent
f712f00602
commit
ba04f62f6d
10
GL/clip.c
10
GL/clip.c
|
@ -221,17 +221,17 @@ void _glClipTriangleStrip(SubmissionTarget* target, uint8_t fladeShade) {
|
||||||
Vertex* v2 = (even) ? vertex - 1 : vertex - 2;
|
Vertex* v2 = (even) ? vertex - 1 : vertex - 2;
|
||||||
Vertex* v3 = vertex;
|
Vertex* v3 = vertex;
|
||||||
|
|
||||||
/* Indexes into extras array */
|
|
||||||
vi1 = v1 - start;
|
|
||||||
vi2 = v2 - start;
|
|
||||||
vi3 = v3 - start;
|
|
||||||
|
|
||||||
/* Skip ahead if we don't have a complete triangle yet */
|
/* Skip ahead if we don't have a complete triangle yet */
|
||||||
if(v1->flags != VERTEX_CMD || v2->flags != VERTEX_CMD) {
|
if(v1->flags != VERTEX_CMD || v2->flags != VERTEX_CMD) {
|
||||||
triangle = -1;
|
triangle = -1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Indexes into extras array */
|
||||||
|
vi1 = v1 - start;
|
||||||
|
vi2 = v2 - start;
|
||||||
|
vi3 = v3 - start;
|
||||||
|
|
||||||
uint8_t visible = ((v1->w > 0) ? 4 : 0) | ((v2->w > 0) ? 2 : 0) | ((v3->w > 0) ? 1 : 0);
|
uint8_t visible = ((v1->w > 0) ? 4 : 0) | ((v2->w > 0) ? 2 : 0) | ((v3->w > 0) ? 1 : 0);
|
||||||
|
|
||||||
switch(visible) {
|
switch(visible) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user