Changes between Version 2 and Version 3 of GraphicsApiOld
- Timestamp:
- Apr 23, 2007, 4:59:15 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GraphicsApiOld
v2 v3 8 8 == Integrated graphics == 9 9 10 Graphics can either be integrated in your main application or generated by a separate program. The integrated approach is recommended, and we'll describe it first. In this approach, instead of boinc_init(), an application calls10 Graphics can either be integrated in your main application or generated by a separate program. The integrated approach is recommended, and we'll describe it first. In this approach, instead of `boinc_init()`, an application calls 11 11 12 12 {{{ … … 24 24 On Unix, your graphics code must be put in a separate shared library (.so) file. This is because Unix hosts may not have the needed libraries (OpenGL, GLUT, X11). If an application is linked dynamically to these libraries, it will fail on startup if the libraries are not present. On the other hand, if an application is linked statically to these libraries, graphics will be done very inefficiently on most hosts. 25 25 26 The shared library must have the same name as the executable followed by '.so'. It must be linked with libboinc_graphics_impl.a, with your rendering and input-handling functions, and (dynamically) with glut and opengl. You must bundle the main program and the shared library together as a [http://boinc.berkeley.edu/tool_update_versions.php multi-file application version]. Unix/Linux applications that use graphics should compile all files with -D_REENTRANT, since graphics uses multiple threads.26 The shared library must have the same name as the executable followed by '.so'. It must be linked with `libboinc_graphics_impl.a`, with your rendering and input-handling functions, and (dynamically) with glut and opengl. You must bundle the main program and the shared library together as a [http://boinc.berkeley.edu/tool_update_versions.php multi-file application version]. Unix/Linux applications that use graphics should compile all files with `-D_REENTRANT`, since graphics uses multiple threads. 27 27 28 28 The [http://boinc.berkeley.edu/example.php BOINC example application] uses this technique, and shows the Makefile command that are needed to produce the shared library on Unix. … … 100 100 Several graphics-related classes were developed for SETI@home. They may be of general utility. 101 101 102 REDUCED_ARRAY 102 `REDUCED_ARRAY` 103 103 Represents a two-dimensional array of data, which is reduced to a smaller dimension by averaging or taking extrema. Includes member functions for drawing the reduced data as a 3D graph in several ways (lines, rectangles, connected surface). 104 PROGRESS and PROGRESS_2D 104 `PROGRESS` and `PROGRESS_2D` 105 105 Represent progress bars, depicted in 3 or 2 dimensions. 106 RIBBON_GRAPH 106 `RIBBON_GRAPH` 107 107 Represents of 3D graph of a function of 1 variable. 108 MOVING_TEXT_PANEL 109 Represents a flanged 3D panel, moving cyclically in 3 dimen tions, on which text is displayed.110 STARFIELD 108 `MOVING_TEXT_PANEL` 109 Represents a flanged 3D panel, moving cyclically in 3 dimensions, on which text is displayed. 110 `STARFIELD` 111 111 Represents a set of randomly-generated stars that move forwards or backwards in 3 dimensions. 112 TEXTURE_DESC 113 Represents an image (JPEG, Targa, BMP, PNG, or RGB 112 `TEXTURE_DESC` 113 Represents an image (JPEG, Targa, BMP, PNG, or RGB``) displayed in 3 dimensions. 114 114 115 The file api/txf_util.Chas support functions from drawing nice-looking 3D text.115 The file `api/txf_util.C` has support functions from drawing nice-looking 3D text. 116 116 117 117 = Static graphics = 118 118 119 An application can display a pre-existing image file (JPEG, GIFF, BMP or Targa) as its graphic. This is the simplest approach since you don't need to develop any code. You must include the image file with each workunit. To do this, link the application with api/static_graphics.C(edit this file to use your filename). You can change the image over time, but you must change the (physical, not logical) name of the file each time.119 An application can display a pre-existing image file (JPEG, GIFF, BMP or Targa) as its graphic. This is the simplest approach since you don't need to develop any code. You must include the image file with each workunit. To do this, link the application with `api/static_graphics.C` (edit this file to use your filename). You can change the image over time, but you must change the (physical, not logical) name of the file each time. 120 120 121 121 = Graphics in a separate program = 122 122 123 In this approach, an application bundles a 'main program' and a 'graphics program'. The main program executes the graphics program, and kills it when done. The main and graphics programs typically communicate using shared memory; you can use the functions in boinc/lib/shmem.Cfor this.123 In this approach, an application bundles a 'main program' and a 'graphics program'. The main program executes the graphics program, and kills it when done. The main and graphics programs typically communicate using shared memory; you can use the functions in `boinc/lib/shmem.C` for this. 124 124 125 125 The main program should initialize using