*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
-#include <X11/Intrinsic.h>
+#define DEFAULTS "*delay: 30000 \n" \
+ "*showFPS: False \n" \
+ "*wireframe: False \n" \
+
+# define refresh_boing 0
+# define release_boing 0
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
-#define PROGCLASS "Boing"
-#define HACK_INIT init_boing
-#define HACK_DRAW draw_boing
-#define HACK_RESHAPE reshape_boing
-#define HACK_HANDLE_EVENT boing_handle_event
-#define EVENT_MASK PointerMotionMask
-#define sws_opts xlockmore_opts
-#define DEFAULTS "*delay: 30000 \n" \
- "*showFPS: False \n" \
- "*wireframe: False \n" \
-
-#undef countof
-#define countof(x) (sizeof((x))/sizeof((*x)))
-
-#include "xlockmore.h"
-#include "gltrackball.h"
-#include <ctype.h>
-
-#ifdef USE_GL /* whole file */
-
-#include <GL/glu.h>
-
{&scanlines_p,"scanlines","Scanlines", DEF_SCANLINES, t_Bool},
{&speed, "speed", "Speed", DEF_SPEED, t_Float},
{&angle, "angle", "Angle", DEF_ANGLE, t_Int},
{&scanlines_p,"scanlines","Scanlines", DEF_SCANLINES, t_Bool},
{&speed, "speed", "Speed", DEF_SPEED, t_Float},
{&angle, "angle", "Angle", DEF_ANGLE, t_Int},
- {&ball_size, "ballSize", "BallSize", DEF_SIZE, t_Float},
+ {&ball_size, "ballSize", "BallSize", DEF_BALL_SIZE, t_Float},
{&meridians, "meridians", "meridians", DEF_MERIDIANS, t_Int},
{¶llels, "parallels", "parallels", DEF_PARALLELS, t_Int},
{&tiles, "tiles", "Tiles", DEF_TILES, t_Int},
{&meridians, "meridians", "meridians", DEF_MERIDIANS, t_Int},
{¶llels, "parallels", "parallels", DEF_PARALLELS, t_Int},
{&tiles, "tiles", "Tiles", DEF_TILES, t_Int},
{&bg_str, "boingBackground", "Background", DEF_BACKGROUND, t_String},
};
{&bg_str, "boingBackground", "Background", DEF_BACKGROUND, t_String},
};
-ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
+ENTRYPOINT ModeSpecOpt boing_opts = {countof(opts), opts, countof(vars), vars, NULL};
static void
parse_color (ModeInfo *mi, const char *name, const char *s, GLfloat *a)
static void
parse_color (ModeInfo *mi, const char *name, const char *s, GLfloat *a)
/* boing_configuration *bp = &bps[MI_SCREEN(mi)]; */
glPushMatrix();
glTranslatef (0, 0, -0.5);
/* boing_configuration *bp = &bps[MI_SCREEN(mi)]; */
glPushMatrix();
glTranslatef (0, 0, -0.5);
reshape_boing (ModeInfo *mi, int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
reshape_boing (ModeInfo *mi, int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
boing_handle_event (ModeInfo *mi, XEvent *event)
{
boing_configuration *bp = &bps[MI_SCREEN(mi)];
boing_handle_event (ModeInfo *mi, XEvent *event)
{
boing_configuration *bp = &bps[MI_SCREEN(mi)];
{
gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
!!event->xbutton.state);
{
gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
!!event->xbutton.state);
+ glDisable (GL_CULL_FACE);
+ glDisable (GL_DEPTH_TEST);
+
+ glEnable (GL_LINE_SMOOTH);
+ glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
+ glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable (GL_BLEND);
+