+ fgState.WarningFuncData = userData;
+}
+
+static void fghInitWarningFuncCallback( const char *fmt, va_list ap, FGCBUserData userData )
+{
+ FGWarning* callback = (FGWarning*)&userData;
+ (*callback)( fmt, ap );
+}
+
+void FGAPIENTRY glutInitWarningFunc( FGWarning callback )
+{
+ if (callback)
+ {
+ FGWarning* reference = &callback;
+ glutInitWarningFuncUcall( fghInitWarningFuncCallback, *((FGCBUserData*)reference) );
+ }
+ else
+ {
+ glutInitWarningFuncUcall( NULL, NULL );
+ }