Changes between Version 28 and Version 29 of GraphicsApi
- Timestamp:
- Dec 25, 2011, 9:33:06 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GraphicsApi
v28 v29 1 = Application graphics = 1 [[PageOutline]] 2 = Graphics in BOINC applications = 2 3 3 A BOINC application may produce graphics 4 with a separate 'graphics app' program having the properties that: 4 A BOINC application may produce graphics (e.g. visualizations) in two contexts: 5 5 6 * If invoked with `--fullscreen`, it opens a full-screen borderless window. It must exit on mouse or keyboard input; this is handled automatically by `boinc_graphics_loop()` if you use the [#api BOINC graphics API] library. 6 * As a screensaver 7 * In a window (opened using the Show Graphics button in the BOINC Manager). 8 9 There are two ways to supply these graphics: 10 11 * Using a program (separate from your main program). 12 * Using HTML (this can be used only for the Show Graphics context). 13 In this case your main program supplies a URL that supplies the HTML. 14 This may be an external URL, or it may refer to a web server embedded in your main program 15 (i.e. a URL of the form '''http://localhost:port'''). 16 17 == Graphics applications == 18 19 Normally, both types of graphics are produced using a 'graphics app' program having the properties that: 20 21 * If invoked with `--fullscreen`, it opens a full-screen borderless window. 22 It must exit on mouse or keyboard input; this is handled automatically by `boinc_graphics_loop()` 23 if you use the [#api BOINC graphics API] library. 7 24 * Otherwise it opens a standard window, and may handle mouse/keyboard input. 8 25 9 26 The logical name of the program must be 'graphics_app'. 10 When you set up your application version directory (for a [UpdateVersions#multifile multiple-file application version]), give the graphics program a filename like 27 When you set up your [UpdateVersions application version directory], 28 use an entry like 11 29 {{{ 12 graphics_app=uc2_graphics_5.10_windows_intelx86.exe 30 <file> 31 <physical_name>uppercase_graphics_6.14_windows_intelx86.exe</physical_name> 32 <logical_name>graphics_app</logical_name> 33 </file> 13 34 }}} 14 This will give the file the logical and physical names on respective sides of the equal sign (as described [UpdateVersions#extrainfo here]).35 in your version.xml file. 15 36 16 37 The graphics app is launched by the BOINC Manager and by the screensaver. … … 21 42 22 43 The [#api BOINC graphics API] provides cross-platform support for 23 developing graphics apps ; however, you need not use it.44 developing graphics apps. 24 45 25 46 A complete example can be found in [ExampleApps boinc/samples/example_app]. … … 133 154 * when linking the App, add the resulting file boincAppIcon.RES to the objects 134 155 135 * we call setWinIcon("boinca16","boinca48") in app_graphics_init() 156 * we call setWinIcon("boinca16","boinca48") in app_graphics_init() 136 157 137 == Compatibility == #compatibility158 == Using Web graphics == 138 159 139 Let's call this the "new" way of doing graphics. 140 There is also an "old" way, in which graphics are generated by 141 a separate thread in the main application process 142 (see [GraphicsApiOld old API description]). 143 144 New and old applications types interact with client software versions as follows: 145 146 || || old apps || new apps || 147 || client version 5 || * || * || 148 || client version 6+ || * || ** || 149 150 * graphics work except with service-mode install if compatibility mode is set (options.backwards_compatible_graphics = true;) 151 [[BR]]** graphics work in all situations 160 Your main program can call 161 {{{ 162 boinc_web_graphics_url(char* url) 163 }}} 164 to register a URL to be used for graphics; 165 in this case, the BOINC Manager's '''Show Graphics''' button will 166 open a browser window to this URL.