mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-21 20:39:57 +01:00
Add triangle mode
This commit is contained in:
parent
6f7163be96
commit
5e67aeb2c8
1 changed files with 9 additions and 0 deletions
|
@ -305,6 +305,13 @@ void drawPixel(S3L_PixelInfo *p)
|
||||||
b = p->barycentric[2] >> 1;
|
b = p->barycentric[2] >> 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 5: // triangle index mode
|
||||||
|
{
|
||||||
|
r = S3L_min(p->triangleIndex,255);
|
||||||
|
g = r;
|
||||||
|
b = r;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -518,6 +525,8 @@ int main()
|
||||||
mode = 3;
|
mode = 3;
|
||||||
else if (state[SDL_SCANCODE_KP_4])
|
else if (state[SDL_SCANCODE_KP_4])
|
||||||
mode = 4;
|
mode = 4;
|
||||||
|
else if (state[SDL_SCANCODE_KP_5])
|
||||||
|
mode = 5;
|
||||||
|
|
||||||
if (modelIndex == 2)
|
if (modelIndex == 2)
|
||||||
animate(((double) clock()) / CLOCKS_PER_SEC);
|
animate(((double) clock()) / CLOCKS_PER_SEC);
|
||||||
|
|
Loading…
Reference in a new issue