Ejemplo n.º 1
0
 /// <summary>
 ///     Sets the Spaceball button callback for the current window.
 /// </summary>
 /// <param name="func">
 ///     The new Spaceball button callback function.  See
 ///     <see cref="SpaceballButtonCallback" />.
 /// </param>
 /// <remarks>
 ///     <para>
 ///         <b>glutSpaceballButtonFunc</b> sets the Spaceball button callback for the
 ///         current window.  The Spaceball button callback for a window is called when the
 ///         window has Spaceball input focus (normally, when the mouse is in the window)
 ///         and the user generates Spaceball button presses.  The <i>button</i> parameter
 ///         will be the button number (starting at one).  The number of available
 ///         Spaceball buttons can be determined with
 ///         <c>glutDeviceGet(GLUT_NUM_SPACEBALL_BUTTONS)</c>.  The <i>state</i> is either
 ///         <see cref="GLUT_UP" /> or <see cref="GLUT_DOWN" /> indicating whether the
 ///         callback was due to a release or press respectively.
 ///     </para>
 ///     <para>
 ///         Registering a Spaceball button callback when a Spaceball device is not
 ///         available is ineffectual and not an error.  In this case, no Spaceball button
 ///         callbacks will be generated.
 ///     </para>
 ///     <para>
 ///         Passing <c>null</c> to <b>glutSpaceballButtonFunc</b> disables the generation
 ///         of Spaceball button callbacks.  When a new window is created, no Spaceball
 ///         button callback is initially registered.
 ///     </para>
 /// </remarks>
 /// <seealso cref="SpaceballButtonCallback" />
 /// <seealso cref="glutDeviceGet" />
 // GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state));
 public static void glutSpaceballButtonFunc([In] SpaceballButtonCallback func) {
     spaceballButtonCallback = func;
     __glutSpaceballButtonFunc(spaceballButtonCallback);
 }
Ejemplo n.º 2
0
 private static extern void __glutSpaceballButtonFunc(SpaceballButtonCallback func);