#define IMPLEMENT_CALLBACK_FUNC(a) IMPLEMENT_CALLBACK_FUNC_2NAME(a,a)
/* Implement all these callback setter functions... */
-IMPLEMENT_CALLBACK_FUNC(Reshape);
IMPLEMENT_CALLBACK_FUNC(Position);
IMPLEMENT_CALLBACK_FUNC(Keyboard);
IMPLEMENT_CALLBACK_FUNC(KeyboardUp);
SET_CALLBACK( Display );
}
+void fghDefaultReshape(int width, int height)
+{
+ glViewport( 0, 0, width, height );
+}
+
+void FGAPIENTRY glutReshapeFunc( FGCBReshape callback )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutReshapeFunc" );
+
+ if( !callback )
+ callback = fghDefaultReshape;
+
+ SET_CALLBACK( Reshape );
+}
+
/*
* Sets the Visibility callback for the current window.
* NB: the Visibility func is deprecated in favor of the WindowStatus func,