projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver]
/
hacks
/
glx
/
tangram_shapes.c
diff --git
a/hacks/glx/tangram_shapes.c
b/hacks/glx/tangram_shapes.c
index 283c2ba40dda58b98a856d625d0c5ae9937bd314..19f065b056f2dd43be07047bf255d1d2c1cf3ace 100644
(file)
--- a/
hacks/glx/tangram_shapes.c
+++ b/
hacks/glx/tangram_shapes.c
@@
-9,7
+9,19
@@
* implied warranty.
*/
* implied warranty.
*/
-#include <GL/gl.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#ifndef HAVE_COCOA
+# include <GL/gl.h>
+#endif
+
+#ifdef HAVE_JWZGLES
+# include "jwzgles.h"
+#endif /* HAVE_JWZGLES */
+
+#include "tangram_shapes.h"
#define small_scale ( 1 )
#define large_scale ( 2 )
#define small_scale ( 1 )
#define large_scale ( 2 )
@@
-17,7
+29,8
@@
#define alpha (0.05)
#define alpha (0.05)
-static void tri_45_90(int wire)
+static void
+tri_45_90(int wire)
{
GLfloat vertices[][3] = {
{0, alpha, 0},
{
GLfloat vertices[][3] = {
{0, alpha, 0},
@@
-75,7
+88,8
@@
static void tri_45_90(int wire)
glEnd();
}
glEnd();
}
-void unit_cube(int wire)
+static void
+unit_cube(int wire)
{
glBegin((wire) ? GL_LINE_LOOP : GL_QUADS);
{
glBegin((wire) ? GL_LINE_LOOP : GL_QUADS);
@@
-119,7
+133,8
@@
void unit_cube(int wire)
glEnd();
}
glEnd();
}
-void unit_rhomboid(int wire)
+static void
+unit_rhomboid(int wire)
{
glBegin((wire) ? GL_LINE_LOOP : GL_QUADS);
{
glBegin((wire) ? GL_LINE_LOOP : GL_QUADS);
@@
-165,7
+180,8
@@
void unit_rhomboid(int wire)
/* All of the pieces have the same thickness so all of the Y values are the same */
/* All of the pieces have the same thickness so all of the Y values are the same */
-GLuint get_sm_tri_dl(int wire)
+GLuint
+tangram_get_sm_tri_dl(int wire)
{
GLuint triangle = glGenLists(1);
glNewList(triangle, GL_COMPILE);
{
GLuint triangle = glGenLists(1);
glNewList(triangle, GL_COMPILE);
@@
-175,7
+191,8
@@
GLuint get_sm_tri_dl(int wire)
return triangle;
}
return triangle;
}
-GLuint get_lg_tri_dl(int wire)
+GLuint
+tangram_get_lg_tri_dl(int wire)
{
GLuint triangle = glGenLists(1);
glNewList(triangle, GL_COMPILE);
{
GLuint triangle = glGenLists(1);
glNewList(triangle, GL_COMPILE);
@@
-185,7
+202,8
@@
GLuint get_lg_tri_dl(int wire)
return triangle;
}
return triangle;
}
-GLuint get_md_tri_dl(int wire)
+GLuint
+tangram_get_md_tri_dl(int wire)
{
GLuint triangle = glGenLists(1);
glNewList(triangle, GL_COMPILE);
{
GLuint triangle = glGenLists(1);
glNewList(triangle, GL_COMPILE);
@@
-195,7
+213,8
@@
GLuint get_md_tri_dl(int wire)
return triangle;
}
return triangle;
}
-GLuint get_square_dl(int wire)
+GLuint
+tangram_get_square_dl(int wire)
{
GLuint square = glGenLists(1);
glNewList(square, GL_COMPILE);
{
GLuint square = glGenLists(1);
glNewList(square, GL_COMPILE);
@@
-205,7
+224,8
@@
GLuint get_square_dl(int wire)
return square;
}
return square;
}
-GLuint get_rhomboid_dl(int wire)
+GLuint
+tangram_get_rhomboid_dl(int wire)
{
GLuint rhomboid = glGenLists(1);
glNewList(rhomboid, GL_COMPILE);
{
GLuint rhomboid = glGenLists(1);
glNewList(rhomboid, GL_COMPILE);