Catmull–Clark subdivision surface/C: Difference between revisions
Catmull–Clark subdivision surface/C (view source)
Revision as of 14:09, 1 September 2022
, 1 year agoFixed syntax highlighting.
(tweaks for better display) |
m (Fixed syntax highlighting.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1:
{{libheader|GLUT}}
Full C code, OpenGL program. Looooong. Keybindings of interest: '<' and '>' for subdivision steps; 'w' toggles wireframe mode; arrow keys and space for rotation; 'm' for switching models; misc keys: p, l, a, z, s, p, q.
<
#include <stdlib.h>
#include <string.h>
Line 562 ⟶ 563:
else glColor3fv(color);
glBegin(
glVertex3fv(&(e->v[0]->pos.x));
glVertex3fv(&(e->v[1]->pos.x));
Line 762 ⟶ 763:
return 0;
}</
|