Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

opengl::xscreensaver(3pm) [debian man page]

OpenGL::XScreenSaver(3pm)				User Contributed Perl Documentation				 OpenGL::XScreenSaver(3pm)

NAME
OpenGL::XScreenSaver - prepare environment for writing OpenGL-based XScreenSaver hacks SYNOPSIS
use OpenGL qw(:all); use OpenGL::XScreenSaver; OpenGL::XScreenSaver::init(); # GetOptions(...); # parse your own options, if any OpenGL::XScreenSaver::start(); while(1) { glClear(...); # draw your scene here OpenGL::XScreenSaver::update(); } DESCRIPTION
This module allows you to write OpenGL XScreenSaver hacks in Perl. It prepares the GL to be used with XScreenSaver. Read the synopsis for how your program might look. Description of functions The init() function will return a true value if a window to draw on has been found, and a false value if a window will have to be created. This value can be ignored unless you want to make sure that your screenhack cannot be executed outside XScreenSaver (e.g. if your standalone version comes as an extra binary with keyboard control, which would be useless in a screensaver). The start() function will open the connection to the X server and bind to the window ID or create a new window to draw on (depends on if it was called standalone or from XScreenSaver). The update() function should be called when you finished rendering the frame. It will flush output and swap the buffers. In the future it might also handle a minimal set of X events when run in standalone mode (like window deletion requests by the window manager). The dimensions() function returns a list with the width and the height of the currently used window. About screenhacks What follows is a short description of how it works and what XScreenSaver expects a screenhack to do. XScreenSaver tells the hack on startup what window ID the hack shall draw to. This is either a small window mapping to the screen in the preview dialog, or a fullscreen window. The window ID is passed either via the -window-id option or via the XSCREENSAVER_WINDOW environment variable. init() of this module checks both of these. XScreenSaver handles all user input including exiting and pausing the screensaver. The process is sent a SIGSTOP when the unlock screen is displayed, obviously a SIGCONT when it is dismissed, and when the pointing device is moved or the screen gets unlocked XScreenSaver sends a SIGTERM. This means that no event handling is required by your screenhack whatsoever. This again keeps the design of a screenhack dead simple. SEE ALSO
OpenGL AUTHORS &; COPYRIGHTS Made 2010 by Lars Stoltenow. OpenGL::XScreenSaver is free software; you may redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-02-20 OpenGL::XScreenSaver(3pm)

Check Out this Related Man Page

XScreenSaver(1) 					      General Commands Manual						   XScreenSaver(1)

NAME
glsnake - OpenGL enhanced Rubik's Snake cyclewaster. SYNOPSIS
glsnake [-display host:display.screen] [-window] [-root] [-visual visual] [-delay microseconds] [-fps] [-wireframe] [-scarycolour] [-veloc- ity angular] [-explode distance] [-statictime milliseconds] [-yspin angle] [-zspin angle] DESCRIPTION
glsnake is an imitation of Rubiks' Snake, using OpenGL. OPTIONS
glsnake accepts the following options: -window Draw on a newly-created window. This is the default. -root Draw on the root window. -install Install a private colormap for the window. -visual visual Specify which visual to use. Legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual. -fps Display a running tally of how many frames per second are being rendered. In conjunction with -delay 0, this can be a useful benchmark of your GL performance. -wireframe Display the snake in wireframe mode, rather than the default solid mode. -scarycolour Use the alternate colour scheme for the snake. Shape identification using colour will be disabled. -velocity angular Change the speed at which the snake morphs to a new shape. -explode distance Change the distance between the nodes of a snake. -statictime milliseconds Change the time between morphs. -yspin angle Change the angle of rotation around the Y axis per frame. -zspin angle Change the angle of rotation around the Z axis per frame. ENVIRONMENT
DISPLAY to get the default host and display number. XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property. FILES
/usr/share/glsnake/*.glsnake This XScreenSaver will attempt to read model files installed with the interactive glsnake. SEE ALSO
X(1), xscreensaver(1), glsnake(6) http://spacepants.org/src/glsnake/ BUGS
The snake will happily intersect itself while morphing (this is not a bug). The rotation/camera position sucks. COPYRIGHT
Copyright (C) 2001,2002 by Jamie Wilkinson, Andrew Bennetts, and Peter Aylett. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. AUTHOR
Jamie Wilkinson <jaq@spacepants.org>, Andrew Bennetts <andrew@puzzling.org>, and Peter Aylett <peter@ylett.com>. Ported to XScreenSaver by Jamie Wilkinson. X Version 11 January 15, 2001 XScreenSaver(1)
Man Page