aboutsummaryrefslogtreecommitdiffstats
path: root/demos/glc2glj
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2000-11-18 06:43:49 +0000
committerSven Gothel <[email protected]>2000-11-18 06:43:49 +0000
commit880653d31a8f1ff8384fdbc75b84934bceecfdb8 (patch)
treebdafb71416f176d2a4b73bf716c9dc3f13685a8b /demos/glc2glj
Initial revision
Diffstat (limited to 'demos/glc2glj')
-rwxr-xr-xdemos/glc2glj32
1 files changed, 32 insertions, 0 deletions
diff --git a/demos/glc2glj b/demos/glc2glj
new file mode 100755
index 0000000..2512144
--- /dev/null
+++ b/demos/glc2glj
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+echo "will replace all decimal numbers to java-float constants"
+echo "$1 -> $1.new"
+sed -e '/[0-9][0-9]*\.[0-9][0-9]*/s//&f/g' \
+ -e '/GLbyte/s//byte/g' \
+ -e '/GLshort/s//short/g' \
+ -e '/GLint/s//int/g' \
+ -e '/GLfloat/s//float/g' \
+ -e '/GLclampf/s//float/g' \
+ -e '/GLdouble/s//double/g' \
+ -e '/GLclampd/s//double/g' \
+ -e '/GLubyte/s//byte/g' \
+ -e '/GLboolean/s//boolean/g' \
+ -e '/GLushort/s//short/g' \
+ -e '/GLuint/s//int/g' \
+ -e '/GLenum/s//int/g' \
+ -e '/GLbitfield/s//int/g' \
+ -e '/GLUquadricObj *\*/s//long /g' \
+ -e '/GLUnurbsObj *\*/s//long /g' \
+ -e '/GLUtesselator *\*/s//long /g' \
+ -e '/GLUtriangulatorObj *\*/s//long /g' \
+ -e '/cos/s//(float)Math.cos/g' \
+ -e '/sin/s//(float)Math.sin/g' \
+ -e '/sqrt/s//(float)Math.sqrt/g' \
+ -e '/pow/s//(float)Math.pow/g' \
+ -e '/\#define/s//static final int/g' \
+ -e '/glut[A-Z]/s//glut.&/g' \
+ -e '/glu[A-Z]/s//glu.&/g' \
+ -e '/gl[A-Z]/s//gl.&/g' \
+ $1 > $1.new
+