Catmull–Clark subdivision surface/C: Difference between revisions
Content added Content deleted
m (GL_LINE -> GL_LINES) |
m (Fixed syntax highlighting.) |
||
Line 1: | Line 1: | ||
{{libheader|GLUT}} |
{{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. |
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. |
||
< |
<syntaxhighlight lang="c">#include <stdio.h> |
||
#include <stdlib.h> |
#include <stdlib.h> |
||
#include <string.h> |
#include <string.h> |
||
Line 763: | Line 763: | ||
return 0; |
return 0; |
||
}</ |
}</syntaxhighlight> |