Changes between Version 28 and Version 29 of GraphicsApi


Ignore:
Timestamp:
Dec 25, 2011, 9:33:06 PM (12 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GraphicsApi

    v28 v29  
    1 = Application graphics =
     1[[PageOutline]]
     2= Graphics in BOINC applications =
    23
    3 A BOINC application may produce graphics
    4 with a separate 'graphics app' program having the properties that:
     4A BOINC application may produce graphics (e.g. visualizations) in two contexts:
    55
    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
     9There 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
     19Normally, 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.
    724 * Otherwise it opens a standard window, and may handle mouse/keyboard input.
    825
    926The 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
     27When you set up your [UpdateVersions application version directory],
     28use an entry like
    1129{{{
    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>
    1334}}}
    14 This will give the file the logical and physical names on respective sides of the equal sign (as described [UpdateVersions#extrainfo here]).
     35in your version.xml file.
    1536
    1637The graphics app is launched by the BOINC Manager and by the screensaver.
     
    2142
    2243The [#api BOINC graphics API] provides cross-platform support for
    23 developing graphics apps; however, you need not use it.
     44developing graphics apps.
    2445
    2546A complete example can be found in [ExampleApps boinc/samples/example_app].
     
    133154 * when linking the App, add the resulting file boincAppIcon.RES to the objects
    134155
    135  * we call setWinIcon("boinca16","boinca48") in app_graphics_init() 
     156 * we call setWinIcon("boinca16","boinca48") in app_graphics_init()
    136157
    137 == Compatibility == #compatibility
     158== Using Web graphics ==
    138159
    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
     160Your main program can call
     161{{{
     162boinc_web_graphics_url(char* url)
     163}}}
     164to register a URL to be used for graphics;
     165in this case, the BOINC Manager's '''Show Graphics''' button will
     166open a browser window to this URL.