+#define DEFAULTS "*delay: 20000 \n" \
+ "*showFPS: False \n" \
+ "*wireframe: False \n"
+
+# define refresh_stonerview 0
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#include "xlockmore.h"
+
+#ifdef USE_GL /* whole file */
+
+#include "stonerview.h"
+#include "gltrackball.h"
+
+#define DEF_TRANSPARENT "True"
+
+typedef struct {
+ GLXContext *glx_context;
+ stonerview_state *st;
+ trackball_state *trackball;
+ Bool button_down_p;
+} stonerview_configuration;
+
+static stonerview_configuration *bps = NULL;
+
+static Bool transparent_p;
+
+
+static XrmOptionDescRec opts[] = {
+ { "-transparent", ".transparent", XrmoptionNoArg, "True" },
+ { "+transparent", ".transparent", XrmoptionNoArg, "False" },
+};
+
+static argtype vars[] = {
+ {&transparent_p, "transparent", "Transparent", DEF_TRANSPARENT, t_Bool},
+};
+
+ENTRYPOINT ModeSpecOpt stonerview_opts = {countof(opts), opts, countof(vars), vars, NULL};
+
+
+ENTRYPOINT void
+reshape_stonerview (ModeInfo *mi, int width, int height)
+{
+ GLfloat h = (GLfloat) height / (GLfloat) width;
+
+ glViewport(0, 0, (GLint) width, (GLint) height);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslatef(0.0, 0.0, -40.0);
+}
+