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
endgame - endgame chess screensaver SYNOPSIS
endgame [-display host:display.screen] [-window] [-root] [-install] [-visual visual] [-delay microseconds] [-fps] DESCRIPTION
endgame replays a brilliant chess ending OPTIONS
endgame accepts the following options: -window Draw on a newly-created window. This is the default. -root Draw on the root window. -wire wireframe mode might be to your liking. -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. 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. BUGS
It's not unknown for this and other OpenGL hacks to fail under hardware accelaration (UtahGLX) and take the X server with them. Texture images must be 16x16 or 32x32 or 64x64 etc. SEE ALSO
X(1), xscreensaver(1) xscreensaver-demo(1), xscreensaver-getimage(1) COPYRIGHT
Copyright (C) 2002 by Blair Tennessy. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHOR
Blair Tennessy <tennessb@unbc.ca>, 20-April-2002. May 2002 XScreenSaver(1)
Man Page