README for xfpd 1.0 xfpd is a program to display the protein chain stored in a FAH work file using OpenGL. It currenly runs on Unix and Win32 systems and should run on MacOSX systems with minimal changes. Its distributed under the terms of the GNU Public License (GPL). Compilation: On UNIX: You will need: * OpenGL (Mesa is fine) * glut-3.x (I use the current version, 3.7) * a working C compiler * GNU make Edit the Makefile and config.h to suit your platform. Run `make all' On Windows (with VS .NET): You will need: * Glut 3.7 binary distribution (from opengl.org) * Visual Studio .NET (with Visual C++) (Sorry, no VS6 or earlier project files - you can use the instructions below to set one up however) Unpack the Glut3.7 binary distribution somewhere sensible. Install the glut32.dll into your System32 directory. In Visual Studio, add the directory where you unpacked glut to your include and library paths. Open xfpd.sln, and use build. On Windows (other): You will need: * Glut 3.7 binary distribution. * OpenGL headers and linking stubs (if your compiler doesn't come with them). Create a console application project. Edit the linking properties and add glut32.lib, glu32.lib and opengl32.lib to the library list. Edit the compilation properties and make sure "treat all as C++" is NOT set. (The code is C, not C++ and will not compile as C++). Make sure that the compiler defines WIN32. Make sure that the Glut3.7 .lib and .h file are in the include and library paths. Add conffile.c, fah.c, render.c, xfpd.c, trackball.c amd strutil.c to the project. Optionally add xfpd.rc to the project if an icon is desired. Build as per your toolchain. Invokation: the main binary is `xfpd'. `xfpd -help' will give you a brief summary of commandline options. xfpd also uses a config file to store some defaults. On Unix (and OSX) systems, the systemwide config exists in /etc/xfpd.conf. Upon execution, xfpd will copy these settings into a local config file, ~/.xfpd.conf. You will need to manually remove keys in that file if you wish to reset them to defaults. On windows, there is only a single config file which is created if it doesn't exist, and that is xfpd.ini which resides in the directory from which you executed xfpd. Interface: Right mouse button brings up the in-application menu. From here you can set most options from the original fpd. Dragging with the left mouse button rotates the view. Dragging with the middle button (or with shift-left mouse button) lets you zoom in and out using Y axis movement. The model will be updated as you drag to help you with your operations. Hitting Escape (or selecting Quit from the menu) exits. Performance: xfpd was written on systems with Hardware GL Acceleration, however its been tested with Indirect GLX. If you are running using Software OpenGL, use of the `-fwf' (Fast Wire-frame) option is recommended - this option sets xfpd to use simple line wireframe previews when performing interactive rotations. Stereoscopic Hardware Support: xfpd was written to explicitly support Quad-buffered stereoscopic hardware. To enable this support use the `-stereo' option. Use of `-fullscreen' is also recommended for this mode. You can NOT disable double-buffering and enable stereo for obvious reasons. Once you've started with stereo mode, use Ctrl-left dragging (Y movement only) to set the depth point, and Ctrl-Shift-Left (X movement only) dragging to set the intereye movement. These settings are saved to your config on exit, so you should only need to set them up once. The current defaults are intended for use on the large projection wall system at Univeristy of Sydney, and may not suit small monitors - adjusting the intereye distance should correct this. Configuration File Settings: The configuration file is a reduced windows .ini format. The current keys and their datatypes are: background_red (float) red level for the background, scaled 0.0 to 1.0 background_green (float) green level for the background, scaled 0.0 to 1.0 background_blue (float) blue level for the background, scaled 0.0 to 1.0 default_datafile (string) path of the .xyz file to load by default. quality_moving (integer) rendering quality (from -10 to 10) to use during interactive positioning. quality_static (integer) rendering quality (from -10 to 10) to use for static display and idle-spinning display. stereo_depth (float) stereo_seperation (float) parameters for the stereoscopic support. Don't edit these directly, but instead use the internal controls described in stereoscopic hardware support. Known Bugs: * No makefile for windows yet. Deal with it. * the bonds in FWF are drawn too wide. I still have to find this one. * the bonds in FWF are drawn twice. (Almost impossible to correct) * the interface is deficient and doesn't let you set all the options fpd had at runtime. (I might fix this one day) * (Win32 only) Console window is created at runtime. To the best of my knowledge, this is a GLUTism. If anybody has a way to fix this, let me know. * (Unix only) i18n message catalog support (via gettext) is stubbed in, but no message catalogues or translation files exist yet, nor does the makefile deal with these. This should be trivial for somebody else to pick up and finish off. Tested Platforms: Solaris 2.6 on UltraSparc (gcc 3.1) Debian GNU/Linux testing/unstable on Athlon (gcc 3.3) Windows XP on various intel systems (Visual C 6 + Visual C .NET) Authors: xfpd was written primarily by Chris Collins , also known as "Crossfire". He has been responsible for other unix utilities such as id3tool, as well as a few hardware drivers for linux. It is heavily based on the original fpd by Richard P. Howell IV . The original fpd is available from http://www.boston.quik.com/rph/fah.html -- Chris Collins, Tue 19 Aug 2003, 11:40 AM