Exemplo n.º 1
0
 /// <summary>
 ///     Sets the reshape callback for the current window.
 /// </summary>
 /// <param name="func">
 ///     The new reshape callback function.  See <see cref="ReshapeCallback" />.
 /// </param>
 /// <remarks>
 ///     <para>
 ///         <b>glutReshapeFunc</b> sets the reshape callback for the current window.  The
 ///         reshape callback is triggered when a window is reshaped.  A reshape callback
 ///         is also triggered immediately before a window's first display callback after a
 ///         window is created or whenever an overlay for the window is established.  The
 ///         <i>width</i> and <i>height</i> parameters of the callback specify the new
 ///         window size in pixels.  Before the callback, the current window is set to the
 ///         window that has been reshaped.
 ///     </para>
 ///     <para>
 ///         If a reshape callback is not registered for a window or <c>null</c> is passed
 ///         to <b>glutReshapeFunc</b> (to deregister a previously registered callback),
 ///         the default reshape callback is used.  This default callback will simply call
 ///         <c>Gl.glViewport(0, 0, width, height)</c> on the normal plane (and on the
 ///         overlay if one exists).
 ///     </para>
 ///     <para>
 ///         If an overlay is established for the window, a single reshape callback is
 ///         generated.  It is the callback's responsibility to update both the normal
 ///         plane and overlay for the window (changing the layer in use as necessary).
 ///     </para>
 ///     <para>
 ///         When a top-level window is reshaped, subwindows are not reshaped.  It is up to
 ///         the GLUT program to manage the size and positions of subwindows within a
 ///         top-level window.  Still, reshape callbacks will be triggered for subwindows
 ///         when their size is changed using <see cref="glutReshapeWindow" />.
 ///     </para>
 /// </remarks>
 /// <seealso cref="ReshapeCallback" />
 /// <seealso cref="glutReshapeWindow" />
 // GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height));
 public static void glutReshapeFunc([In] ReshapeCallback func) {
     reshapeCallback = func;
     __glutReshapeFunc(reshapeCallback);
 }
Exemplo n.º 2
0
 private static extern void __glutReshapeFunc(ReshapeCallback func);