Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glutreshapefunc(3) [centos man page]

UNTITLED
LOCAL UNTITLED NAME
glutReshapeFunc -- Sets the Reshape callback for the current window. LIBRARY
OpenGLUT - windowcallback SYNOPSIS
#include <openglut.h> void glutReshapeFunc(void( *callback )( int w, int h )); PARAMETERS
callback Client function for reshape-window event. DESCRIPTION
This registers a function with OpenGLUT, which OpenGLUT will invoke whenever the window is reshaped or resized. Your callback is only invoked when the host window system has actually changed the window size. The parameters to your callback are the new width and height for your window. If you do not provide a reshape callback, OpenGLUT will simply call glViewport(0,0, w, h). This callback is bound to the current window . To ask OpenGLUT about the present dimensions of the current window , you can use glutGet(). CAVEATS
Unlike other callbacks, GLUT has an active default behavior if you do not set this. (Most event types passively do nothing if you do not specify a callback to handle them.) The reshape callback should always be called, if registered, when your window is first created. SEE ALSO
glutGet(3) glutReshapeWindow(3) Epoch

Check Out this Related Man Page

glutReshapeFunc(3GLUT)						       GLUT						    glutReshapeFunc(3GLUT)

NAME
glutReshapeFunc - sets the reshape callback for the current window. SYNTAX
#include <GLUT/glut.h> void glutReshapeFunc(void (*func)(int width, int height)); ARGUMENTS
func The new reshape callback function. DESCRIPTION
glutReshapeFunc 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 width and height parameters of the callback specify the new window size in pixels. Before the callback, the cur- rent window is set to the window that has been reshaped. If a reshape callback is not registered for a window or NULL is passed to glutReshapeFunc (to deregister a previously registered callback), the default reshape callback is used. This default callback will simply call glViewport(0,0,width,height) on the normal plane (and on the overlay if one exists). 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). 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 subwin- dows within a top-level window. Still, reshape callbacks will be triggered for subwindows when their size is changed using glutReshapeWin- dow. SEE ALSO
glutDisplayFunc, glutReshapeWindow AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutReshapeFunc(3GLUT)
Man Page