LaLanne - Exercising the whole BOINC API
This program is a complete test, a full exercise program, for the BOINC API and BOINC graphics.
Last modified: 3 October 2009 Exercising the BOINC API
This program is a BOINC application which demonstrates many (though not yet all) of the features of the BOINC basic, diagnostic and graphics APIs. These include:
Topics Graphics The Boinclet Additional Notes Release Notes The features which are not yet included (but might be in a future version) are:
- Turning on diagnostic output and redirecting it to stderr
- Obtaining information about the user, application, and workunit
- Checkpointing - both saving and restarting
- Registering the fraction of work done for a running workunit
- Putting the graphics thread in separate file
- Graphics routines to initialize, render and resize.
- Display of a static graphic image
- Use of GLUT for text and Object rendering via a Display List
- Getting the version number of the BOINC code
- Termination based on condition (time limit or no graphics)
- Trickle messages
- Using "texture" fonts
- Texture mapping - Mapping an image file onto the surface of an object
- Bypassing the rendering routine when the window size is (0,0)
The BOINC APIs are documented on the BOINC website at
The application comes in several parts parts:
It is possible to compile and run the application without graphics by not setting the compiler macro BOINC_APP_GRAPHICS. It is also possible to compile and run with graphics but without relying on GLUT by not setting USE_GLUT. If you don't use GLUT you won't get text in the graphics.
- the generic main program thread (no graphics), called app_main.C,
- the code specific to this appliation (except graphics), demonstrating API features, called lalanne.C,
- the code to perform a similation of Buffon's Needle (this is the "worker" thread for this app), called buffon.C/h,
- the code to to display the static graphics image at the begining and end of the task, in the file lalanne_poster.C, and
- the graphics thread, called lalanne_gfx.C.
Graphics
The application displays a simple OpenGL graphics animation, which provides a working example of how to do that. Just take out my silly drawings and put in your own graphics. Remember also that for the screensaver you must set the viewpoint and projection, there is no reasonable default as there usually is for GLUT programs.At the end of the application a static image is loaded just to show off how to do that as well. This is copied almost completely from the file static_graphics.C which comes with the BOINC distribution.
The BOINC API for applications using graphics changed at version 4.52. This program demonstrates only the newer API (previous versions showed both, based on the BOINC version number).
The Boinclet
Along with the lalanne app for BOINC, the Makefile contains instructions for building a program called the "boinclet", which is a test-stand for BOINC graphics. The idea is that you can build and test your graphics on Unix without having to build a complete BOINC application. Then you can just put your graphics into the application and it should work as expected. This speeds graphics development. The boinclet should work for any BOINC graphics code, not just this example. Separate documentation for the boinclet is under development.There is a project file for a boinclet version of the graphics thread for Windows included in the Solution file, but it has not been yet been tested and probably does not yet work.
Additional Notes
You can get a tarball containing the source code and build scripts here.On unix you can use CVS to get the code thus:
$ cvs -d :pserver:anonymous@spy-hill.net/usr/local/cvsroot/boinc checkout src/apps/lalanne.dThen move the directory lalanne.d to wherever you want to use it. On Windows you should move it to the boinc/apps folder to get the paths to match up correctly. Further documentation about how to use CVS, including how to get this application via CVS on Windows, is under development.
Copyright © 2009 by Spy Hill Research | http://www.Spy-Hill.net/~myers/help/boinc/lalanne.html | (served by Islay.spy-hill.com) | Last modified: 03 October 2009 |