X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=freeglut-1.3%2Ffreeglut_internal.h;h=5b9df43bd12ef321f644a8d59e245a0c632ce2ca;hb=d0ce50a0da001bb3f076bab3d0adcc639ed40b5f;hp=977e69d9c74cda1ef8e8f06a0dacf9ab6fecb20f;hpb=e52b4f43a6c82fb50059cea5d3ef2c824de3b5c7;p=freeglut diff --git a/freeglut-1.3/freeglut_internal.h b/freeglut-1.3/freeglut_internal.h index 977e69d..5b9df43 100644 --- a/freeglut-1.3/freeglut_internal.h +++ b/freeglut-1.3/freeglut_internal.h @@ -28,6 +28,11 @@ #ifndef FREEGLUT_INTERNAL_H #define FREEGLUT_INTERNAL_H +/* XXX Update these for each release! */ +#define VERSION_MAJOR 1 +#define VERSION_MINOR 4 +#define VERSION_PATCH 0 + /* * Freeglut is meant to be available under all Unix/X11 and Win32 platforms. */ @@ -84,10 +89,9 @@ #include #include - /* - * This will generate errors, but I don't have any idea how to fix it (will autoconf help?) - */ + #ifndef __sgi #include + #endif #endif /* @@ -120,8 +124,6 @@ typedef void (* FGCBmotion )( int, int ); typedef void (* FGCBpassive )( int, int ); typedef void (* FGCBentry )( int ); typedef void (* FGCBwindowStatus )( int ); -typedef void (* FGCBmenuState )( int ); -typedef void (* FGCBmenuStatus )( int, int, int ); typedef void (* FGCBselect )( int, int, int ); typedef void (* FGCBjoystick )( unsigned int, int, int, int ); typedef void (* FGCBkeyboardUp )( unsigned char, int, int ); @@ -141,6 +143,8 @@ typedef void (* FGCBdestroy )( void ); */ typedef void (* FGCBidle )( void ); typedef void (* FGCBtimer )( int ); +typedef void (* FGCBmenuState )( int ); +typedef void (* FGCBmenuStatus )( int, int, int ); /* * The callback used when creating/using menus @@ -221,6 +225,10 @@ struct tagSFG_State GLboolean IgnoreKeyRepeat; /* Whether to ignore key repeat... */ + GLuint FPSInterval; /* Interval between FPS printfs */ + GLuint SwapCount; /* Count of glutSwapBuffer calls */ + GLuint SwapTime; /* Time of last SwapBuffers */ + SFG_Time Time; /* The time that glutInit was called */ SFG_List Timers; /* The freeglut timer hooks */ @@ -289,16 +297,18 @@ typedef struct tagSFG_Context SFG_Context; struct tagSFG_Context { #if TARGET_HOST_UNIX_X11 - Window Handle; /* The window's handle */ - GLXContext Context; /* The OpenGL context */ - XVisualInfo* VisualInfo; /* The window's visual information */ + Window Handle; /* The window's handle */ + GLXContext Context; /* The OpenGL context */ + XVisualInfo* VisualInfo; /* The window's visual information */ #elif TARGET_HOST_WIN32 - HWND Handle; /* The window's handle */ - HDC Device; /* The window's device context */ - HGLRC Context; /* The window's WGL context */ + HWND Handle; /* The window's handle */ + HDC Device; /* The window's device context */ + HGLRC Context; /* The window's WGL context */ #endif + + int DoubleBuffered; /* Treat the window as double-buffered */ }; /* @@ -374,9 +384,11 @@ typedef struct tagSFG_Menu SFG_Menu; struct tagSFG_Menu { SFG_Node Node; + void *UserData ; /* A. Donev: User data passed back at callback */ int ID; /* The global menu ID */ SFG_List Entries; /* The menu entries list */ FGCBmenu Callback; /* The menu callback */ + FGCBdestroy Destroy; /* A. Donev: Destruction callback */ GLboolean IsActive; /* Is the menu selected? */ int Width; /* Menu box width in pixels */ int Height; /* Menu box height in pixels */ @@ -399,7 +411,7 @@ struct tagSFG_MenuEntry }; /* - * A window, making part of FreeGLUT windows hierarchy. Should be kept portable. + * A window, making part of freeglut windows hierarchy. Should be kept portable. */ typedef struct tagSFG_Window SFG_Window; struct tagSFG_Window @@ -410,6 +422,7 @@ struct tagSFG_Window SFG_Context Window; /* Window and OpenGL context */ SFG_WindowState State; /* The window state */ SFG_WindowCallbacks Callbacks; /* The window callbacks */ + void *UserData ; /* A. Donev: A pointer to user data used in rendering */ SFG_Menu* Menu[ FREEGLUT_MAX_MENUS ]; /* Menus appended to window */ SFG_Menu* ActiveMenu; /* The window's active menu */