Merge branch 'trunk' into git_master

This commit is contained in:
Diederick Niehorster 2014-10-18 00:38:16 +08:00
commit c9c27c8f88
60 changed files with 201 additions and 131 deletions

View File

@ -103,7 +103,7 @@
#define GLUT_AUX4 0x8000
/*
* Context-related flags, see freeglut_state.c
* Context-related flags, see fg_state.c
* Set the requested OpenGL version
*/
#define GLUT_INIT_MAJOR_VERSION 0x0200
@ -112,27 +112,27 @@
#define GLUT_INIT_PROFILE 0x0203
/*
* Flags for glutInitContextFlags, see freeglut_init.c
* Flags for glutInitContextFlags, see fg_init.c
*/
#define GLUT_DEBUG 0x0001
#define GLUT_FORWARD_COMPATIBLE 0x0002
/*
* Flags for glutInitContextProfile, see freeglut_init.c
* Flags for glutInitContextProfile, see fg_init.c
*/
#define GLUT_CORE_PROFILE 0x0001
#define GLUT_COMPATIBILITY_PROFILE 0x0002
/*
* Process loop function, see freeglut_main.c
* Process loop function, see fg_main.c
*/
FGAPI void FGAPIENTRY glutMainLoopEvent( void );
FGAPI void FGAPIENTRY glutLeaveMainLoop( void );
FGAPI void FGAPIENTRY glutExit ( void );
/*
* Window management functions, see freeglut_window.c
* Window management functions, see fg_window.c
*/
FGAPI void FGAPIENTRY glutFullScreenToggle( void );
FGAPI void FGAPIENTRY glutLeaveFullScreen( void );
@ -143,7 +143,7 @@ FGAPI void FGAPIENTRY glutLeaveFullScreen( void );
FGAPI void FGAPIENTRY glutSetMenuFont( int menuID, void* font );
/*
* Window-specific callback functions, see freeglut_callbacks.c
* Window-specific callback functions, see fg_callbacks.c
*/
FGAPI void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) );
FGAPI void FGAPIENTRY glutPositionFunc( void (* callback)( int, int ) );
@ -153,7 +153,7 @@ FGAPI void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
FGAPI void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) );
/*
* State setting and retrieval functions, see freeglut_state.c
* State setting and retrieval functions, see fg_state.c
*/
FGAPI void FGAPIENTRY glutSetOption ( GLenum option_flag, int value );
FGAPI int * FGAPIENTRY glutGetModeValues(GLenum mode, int * size);
@ -164,7 +164,7 @@ FGAPI void* FGAPIENTRY glutGetMenuData( void );
FGAPI void FGAPIENTRY glutSetMenuData(void* data);
/*
* Font stuff, see freeglut_font.c
* Font stuff, see fg_font.c
*/
FGAPI int FGAPIENTRY glutBitmapHeight( void* font );
FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
@ -172,7 +172,7 @@ FGAPI void FGAPIENTRY glutBitmapString( void* font, const unsigned char *stri
FGAPI void FGAPIENTRY glutStrokeString( void* font, const unsigned char *string );
/*
* Geometry functions, see freeglut_geometry.c
* Geometry functions, see fg_geometry.c
*/
FGAPI void FGAPIENTRY glutWireRhombicDodecahedron( void );
FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron( void );
@ -182,7 +182,7 @@ FGAPI void FGAPIENTRY glutWireCylinder( double radius, double height, GLint s
FGAPI void FGAPIENTRY glutSolidCylinder( double radius, double height, GLint slices, GLint stacks);
/*
* Rest of functions for rendering Newell's teaset, found in freeglut_teapot.c
* Rest of functions for rendering Newell's teaset, found in fg_teapot.c
* NB: front facing polygons have clockwise winding, not counter clockwise
*/
FGAPI void FGAPIENTRY glutWireTeacup( double size );
@ -191,7 +191,7 @@ FGAPI void FGAPIENTRY glutWireTeaspoon( double size );
FGAPI void FGAPIENTRY glutSolidTeaspoon( double size );
/*
* Extension functions, see freeglut_ext.c
* Extension functions, see fg_ext.c
*/
typedef void (*GLUTproc)();
FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName );
@ -202,7 +202,7 @@ FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName );
#define GLUT_HAS_MULTI 1
/* TODO: add device_id paramater,
/* TODO: add device_id parameter,
cf. http://sourceforge.net/mailarchive/forum.php?thread_name=20120518071314.GA28061%40perso.beuc.net&forum_name=freeglut-developer */
FGAPI void FGAPIENTRY glutMultiEntryFunc( void (* callback)( int, int ) );
FGAPI void FGAPIENTRY glutMultiButtonFunc( void (* callback)( int, int, int, int, int ) );
@ -210,7 +210,7 @@ FGAPI void FGAPIENTRY glutMultiMotionFunc( void (* callback)( int, int, int ) );
FGAPI void FGAPIENTRY glutMultiPassiveFunc( void (* callback)( int, int, int ) );
/*
* Joystick functions, see freeglut_joystick.c
* Joystick functions, see fg_joystick.c
*/
/* USE OF THESE FUNCTIONS IS DEPRECATED !!!!! */
/* If you have a serious need for these functions in your application, please either
@ -233,7 +233,7 @@ void glutJoystickGetMaxRange( int ident, float *axes );
void glutJoystickGetCenter( int ident, float *axes );
/*
* Initialization functions, see freeglut_init.c
* Initialization functions, see fg_init.c
*/
/* to get the typedef for va_list */
#include <stdarg.h>

View File

@ -417,12 +417,12 @@ FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode );
FGAPI void FGAPIENTRY glutInitDisplayString( const char* displayMode );
/*
* Process loop function, see freeglut_main.c
* Process loop function, see fg_main.c
*/
FGAPI void FGAPIENTRY glutMainLoop( void );
/*
* Window management functions, see freeglut_window.c
* Window management functions, see fg_window.c
*/
FGAPI int FGAPIENTRY glutCreateWindow( const char* title );
FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height );
@ -441,20 +441,20 @@ FGAPI void FGAPIENTRY glutPopWindow( void );
FGAPI void FGAPIENTRY glutFullScreen( void );
/*
* Display-connected functions, see freeglut_display.c
* Display-related functions, see fg_display.c
*/
FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window );
FGAPI void FGAPIENTRY glutPostRedisplay( void );
FGAPI void FGAPIENTRY glutSwapBuffers( void );
/*
* Mouse cursor functions, see freeglut_cursor.c
* Mouse cursor functions, see fg_cursor.c
*/
FGAPI void FGAPIENTRY glutWarpPointer( int x, int y );
FGAPI void FGAPIENTRY glutSetCursor( int cursor );
/*
* Overlay stuff, see freeglut_overlay.c
* Overlay stuff, see fg_overlay.c
*/
FGAPI void FGAPIENTRY glutEstablishOverlay( void );
FGAPI void FGAPIENTRY glutRemoveOverlay( void );
@ -465,7 +465,7 @@ FGAPI void FGAPIENTRY glutShowOverlay( void );
FGAPI void FGAPIENTRY glutHideOverlay( void );
/*
* Menu stuff, see freeglut_menu.c
* Menu stuff, see fg_menu.c
*/
FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) );
FGAPI void FGAPIENTRY glutDestroyMenu( int menu );
@ -480,13 +480,13 @@ FGAPI void FGAPIENTRY glutAttachMenu( int button );
FGAPI void FGAPIENTRY glutDetachMenu( int button );
/*
* Global callback functions, see freeglut_callbacks.c
* Global callback functions, see fg_callbacks.c
*/
FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value );
FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) );
/*
* Window-specific callback functions, see freeglut_callbacks.c
* Window-specific callback functions, see fg_callbacks.c
*/
FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) );
FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) );
@ -515,7 +515,7 @@ FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) );
FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) );
/*
* State setting and retrieval functions, see freeglut_state.c
* State setting and retrieval functions, see fg_state.c
*/
FGAPI int FGAPIENTRY glutGet( GLenum query );
FGAPI int FGAPIENTRY glutDeviceGet( GLenum query );
@ -523,17 +523,19 @@ FGAPI int FGAPIENTRY glutGetModifiers( void );
FGAPI int FGAPIENTRY glutLayerGet( GLenum query );
/*
* Font stuff, see freeglut_font.c
* Font stuff, see fg_font.c
*/
FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character );
FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character );
FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character );
FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character );
FGAPI GLfloat FGAPIENTRY glutStrokeWidthf( void* font, int character ); /* GLUT 3.8 */
FGAPI int FGAPIENTRY glutBitmapLength( void* font, const unsigned char* string );
FGAPI int FGAPIENTRY glutStrokeLength( void* font, const unsigned char* string );
FGAPI GLfloat FGAPIENTRY glutStrokeLengthf( void* font, const unsigned char *string ); /* GLUT 3.8 */
/*
* Geometry functions, see freeglut_geometry.c
* Geometry functions, see fg_geometry.c
*/
FGAPI void FGAPIENTRY glutWireCube( double size );
@ -554,14 +556,14 @@ FGAPI void FGAPIENTRY glutWireIcosahedron( void );
FGAPI void FGAPIENTRY glutSolidIcosahedron( void );
/*
* Teapot rendering functions, found in freeglut_teapot.c
* Teapot rendering functions, found in fg_teapot.c
* NB: front facing polygons have clockwise winding, not counter clockwise
*/
FGAPI void FGAPIENTRY glutWireTeapot( double size );
FGAPI void FGAPIENTRY glutSolidTeapot( double size );
/*
* Game mode functions, see freeglut_gamemode.c
* Game mode functions, see fg_gamemode.c
*/
FGAPI void FGAPIENTRY glutGameModeString( const char* string );
FGAPI int FGAPIENTRY glutEnterGameMode( void );
@ -569,7 +571,7 @@ FGAPI void FGAPIENTRY glutLeaveGameMode( void );
FGAPI int FGAPIENTRY glutGameModeGet( GLenum query );
/*
* Video resize functions, see freeglut_videoresize.c
* Video resize functions, see fg_videoresize.c
*/
FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query );
FGAPI void FGAPIENTRY glutSetupVideoResizing( void );
@ -578,21 +580,21 @@ FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height );
FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height );
/*
* Colormap functions, see freeglut_misc.c
* Colormap functions, see fg_misc.c
*/
FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue );
FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component );
FGAPI void FGAPIENTRY glutCopyColormap( int window );
/*
* Misc keyboard and joystick functions, see freeglut_misc.c
* Misc keyboard and joystick functions, see fg_misc.c
*/
FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore );
FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode );
FGAPI void FGAPIENTRY glutForceJoystickFunc( void );
/*
* Misc functions, see freeglut_misc.c
* Misc functions, see fg_misc.c
*/
FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension );
FGAPI void FGAPIENTRY glutReportErrors( void );

View File

@ -32,7 +32,7 @@
#include "egl/fg_internal_egl.h"
/* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
/* The structure used by display initialization in freeglut_init.c */
/* The structure used by display initialization in fg_init.c */
typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay;
struct android_app;
struct tagSFG_PlatformDisplay
@ -68,7 +68,7 @@ struct touchscreen {
/* -- JOYSTICK-SPECIFIC STRUCTURES AND TYPES ------------------------------- */
/*
* Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c"
* Initial defines from "js.h" starting around line 33 with the existing "fg_joystick.c"
* interspersed
*/

View File

@ -54,7 +54,7 @@
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "FreeGLUT-jnicb", __VA_ARGS__))
#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "FreeGLUT-jnicb", __VA_ARGS__))
/* Cf. freeglut_main_android.c */
/* Cf. fg_main_android.c */
extern int32_t handle_input(struct android_app* app, AInputEvent* event);
extern void handle_cmd(struct android_app* app, int32_t cmd);

View File

@ -37,7 +37,7 @@
#include <bps/navigator.h>
/* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
/* The structure used by display initialization in freeglut_init.c */
/* The structure used by display initialization in fg_init.c */
typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay;
struct tagSFG_PlatformDisplay
{
@ -76,7 +76,7 @@ struct touchscreen {
/* -- JOYSTICK-SPECIFIC STRUCTURES AND TYPES ------------------------------- */
/*
* Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c"
* Initial defines from "js.h" starting around line 33 with the existing "fg_joystick.c"
* interspersed
*/

View File

@ -1,5 +1,5 @@
/*
* freeglut_display_android.c
* fg_display_android.c
*
* Display message posting, context buffer swapping.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_internal_android.h
* fg_internal_android.h
*
* The freeglut library private include file.
*
@ -29,7 +29,7 @@
#include <EGL/egl.h>
/* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
/* The structure used by display initialization in freeglut_init.c */
/* The structure used by display initialization in fg_init.c */
struct tagSFG_Window;
struct tagSFG_PlatformDisplayEGL
{

View File

@ -1,5 +1,5 @@
/*
* freeglut_display_android.c
* fg_display_android.c
*
* Window management methods for EGL
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_callbacks.c
* fg_callbacks.c
*
* The callbacks setting methods.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_cursor.c
* fg_cursor.c
*
* The mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_display.c
* fg_display.c
*
* Display message posting, context buffer swapping.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_ext.c
* fg_ext.c
*
* Functions related to OpenGL extensions.
*
@ -125,8 +125,10 @@ static GLUTproc fghGetGLUTProcAddress( const char* procName )
CHECK_NAME(glutBitmapWidth);
CHECK_NAME(glutStrokeCharacter);
CHECK_NAME(glutStrokeWidth);
CHECK_NAME(glutStrokeWidthf);
CHECK_NAME(glutBitmapLength);
CHECK_NAME(glutStrokeLength);
CHECK_NAME(glutStrokeLengthf);
CHECK_NAME(glutWireSphere);
CHECK_NAME(glutSolidSphere);
CHECK_NAME(glutWireCone);

View File

@ -1,5 +1,5 @@
/*
* freeglut_font.c
* fg_font.c
*
* Bitmap and stroke fonts displaying.
*
@ -37,7 +37,7 @@
/* -- IMPORT DECLARATIONS -------------------------------------------------- */
/*
* These are the font faces defined in freeglut_font_data.c file:
* These are the font faces defined in fg_font_data.c file:
*/
extern SFG_Font fgFontFixed8x13;
extern SFG_Font fgFontFixed9x15;
@ -346,7 +346,7 @@ void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string )
/*
* Return the width in pixels of a stroke character
*/
int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
GLfloat FGAPIENTRY glutStrokeWidthf( void* fontID, int character )
{
const SFG_StrokeChar *schar;
SFG_StrokeFont* font;
@ -364,17 +364,21 @@ int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
schar = font->Characters[ character ];
freeglut_return_val_if_fail( schar, 0 );
return ( int )( schar->Right + 0.5 );
return schar->Right;
}
int FGAPIENTRY glutStrokeWidth(void* fontID, int character)
{
return ( int )( glutStrokeWidthf(fontID,character) + 0.5f );
}
/*
* Return the width of a string drawn using a stroke font
*/
int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string )
GLfloat FGAPIENTRY glutStrokeLengthf( void* fontID, const unsigned char* string )
{
unsigned char c;
float length = 0.0;
float this_line_length = 0.0;
GLfloat length = 0.0;
GLfloat this_line_length = 0.0;
SFG_StrokeFont* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeLength" );
font = fghStrokeByID( fontID );
@ -404,7 +408,11 @@ int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string )
}
if( length < this_line_length )
length = this_line_length;
return( int )( length + 0.5 );
return length;
}
int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string )
{
return( int )( glutStrokeLengthf(fontID,string) + 0.5f );
}
/*

View File

@ -1,5 +1,5 @@
/*
* freeglut_gamemode.c
* fg_gamemode.c
*
* The game mode handling code.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_geometry.c
* fg_geometry.c
*
* Freeglut geometry rendering methods.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_init.c
* fg_init.c
*
* Various freeglut initialization functions.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_input_devices.c
* fg_input_devices.c
*
* Handles miscellaneous input devices via direct serial-port access.
* Proper X11 XInput device support is not yet supported.

View File

@ -353,7 +353,7 @@ struct tagSFG_State
FGWarning WarningFunc; /* User defined warning handler */
};
/* The structure used by display initialization in freeglut_init.c */
/* The structure used by display initialization in fg_init.c */
typedef struct tagSFG_Display SFG_Display;
struct tagSFG_Display
{
@ -791,7 +791,7 @@ struct tagSFG_StrokeFont
/* -- JOYSTICK-SPECIFIC STRUCTURES AND TYPES ------------------------------- */
/*
* Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c"
* Initial defines from "js.h" starting around line 33 with the existing "fg_joystick.c"
* interspersed
*/
@ -942,7 +942,7 @@ void fgDestroyStructure( void );
/*
* Window creation, opening, closing and destruction.
* Also CallBack clearing/initialization.
* Defined in freeglut_structure.c, freeglut_window.c.
* Defined in fg_structure.c, fg_window.c.
*/
SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
GLboolean positionUse, int x, int y,
@ -958,11 +958,11 @@ void fgAddToWindowDestroyList ( SFG_Window* window );
void fgCloseWindows ();
void fgDestroyWindow( SFG_Window* window );
/* Menu creation and destruction. Defined in freeglut_structure.c */
/* Menu creation and destruction. Defined in fg_structure.c */
SFG_Menu* fgCreateMenu( FGCBMenu menuCallback );
void fgDestroyMenu( SFG_Menu* menu );
/* Joystick device management functions, defined in freeglut_joystick.c */
/* Joystick device management functions, defined in fg_joystick.c */
int fgJoystickDetect( void );
void fgInitialiseJoysticks( void );
void fgJoystickClose( void );
@ -973,7 +973,7 @@ int fgInputDeviceDetect( void );
void fgInitialiseInputDevices( void );
void fgInputDeviceClose( void );
/* spaceball device functions, defined in freeglut_spaceball.c */
/* spaceball device functions, defined in fg_spaceball.c */
void fgInitialiseSpaceball( void );
void fgSpaceballClose( void );
void fgSpaceballSetWindow( SFG_Window *window );
@ -994,7 +994,7 @@ void fgSetCursor ( SFG_Window *window, int cursorID );
*
* where window is the enumerated (sub)window pointer (SFG_Window *),
* and userData is the a custom user-supplied pointer. Functions
* are defined and exported from freeglut_structure.c file.
* are defined and exported from fg_structure.c file.
*/
void fgEnumWindows( FGCBWindowEnumerator enumCallback, SFG_Enumerator* enumerator );
void fgEnumSubWindows( SFG_Window* window, FGCBWindowEnumerator enumCallback,
@ -1003,14 +1003,14 @@ void fgEnumSubWindows( SFG_Window* window, FGCBWindowEnumerator enumCallback,
/*
* fgWindowByHandle returns a (SFG_Window *) value pointing to the
* first window in the queue matching the specified window handle.
* The function is defined in freeglut_structure.c file.
* The function is defined in fg_structure.c file.
*/
SFG_Window* fgWindowByHandle( SFG_WindowHandleType hWindow );
/*
* This function is similiar to the previous one, except it is
* looking for a specified (sub)window identifier. The function
* is defined in freeglut_structure.c file.
* is defined in fg_structure.c file.
*/
SFG_Window* fgWindowByID( int windowID );
@ -1038,7 +1038,7 @@ void fgDeactivateMenu( SFG_Window *window );
/*
* This function gets called just before the buffers swap, so that
* freeglut can display the pull-down menus via OpenGL. The function
* is defined in freeglut_menu.c file.
* is defined in fg_menu.c file.
*/
void fgDisplayMenu( void );

View File

@ -1,5 +1,5 @@
/*
* freeglut_joystick.c
* fg_joystick.c
*
* Joystick handling code
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_main.c
* fg_main.c
*
* The windows message processing methods.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_menu.c
* fg_menu.c
*
* Pull-down menu creation and handling.
*
@ -782,7 +782,7 @@ void fghCalculateMenuBoxSize( void )
*/
int FGAPIENTRY glutCreateMenu( FGCBMenu callback )
{
/* The menu object creation code resides in freeglut_structure.c */
/* The menu object creation code resides in fg_structure.c */
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" );
if (fgState.ActiveMenus)
fgError("Menu manipulation not allowed while menus in use.");
@ -804,7 +804,7 @@ void FGAPIENTRY glutDestroyMenu( int menuID )
if (fgState.ActiveMenus)
fgError("Menu manipulation not allowed while menus in use.");
/* The menu object destruction code resides in freeglut_structure.c */
/* The menu object destruction code resides in fg_structure.c */
fgDestroyMenu( menu );
}

View File

@ -1,5 +1,5 @@
/*
* freeglut_misc.c
* fg_misc.c
*
* Functions that didn't fit anywhere else...
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_overlay.c
* fg_overlay.c
*
* Overlay management functions (as defined by GLUT API)
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_state.c
* fg_state.c
*
* Freeglut state query methods.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_stroke_mono_roman.c
* fg_stroke_mono_roman.c
*
* freeglut Monospace Roman stroke font definition
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_stroke_roman.c
* fg_stroke_roman.c
*
* freeglut Roman stroke font definition
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_structure.c
* fg_structure.c
*
* Windows and menus need tree structure
*
@ -100,7 +100,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title,
/*
* Open the window now. The fgOpenWindow() function is system
* dependant, and resides in freeglut_window.c. Uses fgState.
* dependant, and resides in fg_window.c. Uses fgState.
*/
fgOpenWindow( window, title, positionUse, x, y, sizeUse, w, h, gameMode,
(GLboolean)(parent ? GL_TRUE : GL_FALSE) );
@ -190,7 +190,7 @@ void fgCloseWindows( )
/*
* This function destroys a window and all of its subwindows. Actually,
* another function, defined in freeglut_window.c is called, but this is
* another function, defined in fg_window.c is called, but this is
* a whole different story...
*/
void fgDestroyWindow( SFG_Window* window )
@ -465,7 +465,7 @@ static void fghcbWindowByHandle( SFG_Window *window,
/*
* fgWindowByHandle returns a (SFG_Window *) value pointing to the
* first window in the queue matching the specified window handle.
* The function is defined in freeglut_structure.c file.
* The function is defined in fg_structure.c file.
*/
SFG_Window* fgWindowByHandle ( SFG_WindowHandleType hWindow )
{
@ -506,7 +506,7 @@ static void fghcbWindowByID( SFG_Window *window, SFG_Enumerator *enumerator )
/*
* This function is similar to the previous one, except it is
* looking for a specified (sub)window identifier. The function
* is defined in freeglut_structure.c file.
* is defined in fg_structure.c file.
*/
SFG_Window* fgWindowByID( int windowID )
{

View File

@ -1,5 +1,5 @@
/*
* freeglut_teapot.c
* fg_teapot.c
*
* Teapot(tm) rendering code.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_teapot_data.h
* fg_teapot_data.h
*
* The freeglut library teapot data include file.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_videoresize.c
* fg_videoresize.c
*
* Video resize functions (as defined by GLUT API)
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_window.c
* fg_window.c
*
* Window management methods.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_cursor_mswin.c
* fg_cursor_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_display_mswin.c
* fg_display_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_gamemode_mswin.c
* fg_gamemode_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_init_mswin.c
* fg_init_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*
@ -34,6 +34,7 @@
extern LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg,
WPARAM wParam, LPARAM lParam );
extern void fgPlatformInitSystemTime();
extern void fghCloseInputDevices(void);
/*
@ -138,8 +139,6 @@ void fgPlatformInitialize( const char* displayName )
/* Platform-Specific Deinitialization Functions: */
extern void fghCloseInputDevices ( void );
void fgPlatformDeinitialiseInputDevices ( void )
{
#if !defined(_WIN32_WCE)

View File

@ -1,5 +1,5 @@
/*
* freeglut_input_devices_mswin.c
* fg_input_devices_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_internal_mswin.h
* fg_internal_mswin.h
*
* The freeglut library private include file.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_joystick_mswin.c
* fg_joystick_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_main_mswin.c
* fg_main_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_menu_mswin.c
* fg_menu_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_spaceball_mswin.c
* fg_spaceball_mswin.c
*
* Spaceball support for Windows
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_state_mswin.c
* fg_state_mswin.c
*
* The Windows-specific state query methods.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_structure_mswin.c
* fg_structure_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_window_mswin.c
* fg_window_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_cursor_x11.c
* fg_cursor_x11.c
*
* The Windows-specific mouse cursor related stuff.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_display_x11.c
* fg_display_x11.c
*
* Display message posting, context buffer swapping.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_ext.c
* fg_ext.c
*
* Functions related to OpenGL extensions.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_gamemode_x11.c
* fg_gamemode_x11.c
*
* The game mode handling code.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_init_x11.c
* fg_init_x11.c
*
* Various freeglut initialization functions.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_input_devices_x11.c
* fg_input_devices_x11.c
*
* Handles miscellaneous input devices via direct serial-port access.
* Proper X11 XInput device support is not yet supported.

View File

@ -1,5 +1,5 @@
/*
* freeglut_internal_x11.h
* fg_internal_x11.h
*
* The freeglut library private include file.
*
@ -49,7 +49,7 @@
/* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
/* The structure used by display initialization in freeglut_init.c */
/* The structure used by display initialization in fg_init.c */
typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay;
struct tagSFG_PlatformDisplay
{
@ -122,7 +122,7 @@ struct tagSFG_PlatformWindowState
/* -- JOYSTICK-SPECIFIC STRUCTURES AND TYPES ------------------------------- */
/*
* Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c"
* Initial defines from "js.h" starting around line 33 with the existing "fg_joystick.c"
* interspersed
*/
# ifdef HAVE_SYS_IOCTL_H
@ -220,12 +220,12 @@ struct tagSFG_PlatformJoystick
/* -- PRIVATE FUNCTION DECLARATIONS ---------------------------------------- */
/* spaceball device functions, defined in freeglut_spaceball.c */
/* spaceball device functions, defined in fg_spaceball.c */
int fgIsSpaceballXEvent( const XEvent *ev );
void fgSpaceballHandleXEvent( const XEvent *ev );
/*
* Check if "hint" is present in "property" for "window". See freeglut_init.c
* Check if "hint" is present in "property" for "window". See fg_init.c
*/
int fgHintPresent(Window window, Atom property, Atom hint);

View File

@ -1,5 +1,5 @@
/*
* freeglut_internal_x11.h
* fg_internal_x11.h
*
* The freeglut library private include file.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_joystick_x11.c
* fg_joystick_x11.c
*
* Joystick handling code
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_main_x11.c
* fg_main_x11.c
*
* The X11-specific windows message processing methods.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_menu_x11.c
* fg_menu_x11.c
*
* Pull-down menu creation and handling.
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_state_x11.c
* fg_state_x11.c
*
* X11-specific freeglut state query methods.
*
@ -54,7 +54,7 @@ int fgPlatformGlutDeviceGet ( GLenum eWhat )
* but at least one X server has a bug where this causes a segfault.
*
* In XFree86/Xorg servers, a mouse wheel is seen as two buttons
* rather than an Axis; "freeglut_main.c" expects this when
* rather than an Axis; "fg_main.c" expects this when
* checking for a wheel event.
*/
{

View File

@ -1,5 +1,5 @@
/*
* freeglut_structure.c
* fg_structure.c
*
* Windows and menus need tree structure
*

View File

@ -1,5 +1,5 @@
/*
* freeglut_window_x11.c
* fg_window_x11.c
*
* Window management methods for X11
*

View File

@ -16,7 +16,7 @@
/* convert the XInput button state mask to the regular X mouse event button mask */
#define BUTTON_MASK(xistate) ((xistate) << 8)
/* import function from freeglut_main.c */
/* import function from fg_main.c */
extern int fgPlatformGetModifiers( int state );
/* extension opcode for XInput */

View File

@ -183,7 +183,9 @@ will thus not work with the currently available 2.8.1 release.
<li>glutStrokeCharacter</li>
<li>glutStrokeString</li>
<li>glutStrokeWidth</li>
<li>glutStrokeWidthf</li>
<li>glutStrokeLength</li>
<li>glutStrokeLengthf</li>
<li>glutStrokeHeight</li>
</ol>
</li>
@ -1945,8 +1947,8 @@ as asterisks. </p>
<h2>14.8 glutStrokeWidth</h2>
<p>
The <tt>glutStrokeWidth</tt> function returns the width in pixels of
a single character in the specified stroke font.
The <tt>glutStrokeWidth</tt> function returns the width in model units of
a single character in the specified stroke font, rounded to an int.
</p>
<p><b>Usage</b> </p>
@ -1974,11 +1976,42 @@ number; the function rounds it to the nearest integer for the return value.
<p>Nonexistent characters return the width
of an asterisk. </p>
<h2>14.9 glutStrokeLength</h2>
<h2>14.9 glutStrokeWidthf</h2>
<p>
The <tt>glutStrokeLength</tt> function returns the width in pixels of
a string of characters in the specified stroke font.
The <tt>glutStrokeWidthf</tt> function returns the width in model units of
a single character in the specified stroke font.
</p>
<p><b>Usage</b> </p>
<p><tt>GLfloat glutStrokeWidthf ( void *font,
int character );</tt> </p>
<p><tt>font
</tt>The stroke font to use in calculating
the character width <br/>
<tt>character </tt>The ASCII
code of the character </p>
<p><b>Description</b></p>
<p>
The <tt>glutStrokeWidthf</tt>
function returns the width of the given character in the specified stroke
font. Function was included in an unreleased GLUT 3.8.
</p>
<p><b>Changes From GLUT</b></p>
<p>Nonexistent characters return the width
of an asterisk. </p>
<h2>14.10 glutStrokeLength</h2>
<p>
The <tt>glutStrokeLength</tt> function returns the width in model units of
a string of characters in the specified stroke font, rounded to an int.
</p>
<p><b>Usage</b></p>
@ -1994,10 +2027,10 @@ whose width is to be calculated </p>
<p><b>Description</b></p>
<p>
The <tt>glutStrokeLength</tt> function returns the width in pixels of the given character string in
The <tt>glutStrokeLength</tt> function returns the width in model units of the given character string in
the specified stroke font. Because the font is a stroke font, the width
of an individual character is a floating-point number. <i>Freeglut</i>
adds the floating-point widths and rounds the funal result to return the
adds the floating-point widths and rounds the final result to return the
integer value. Thus the return value may differ from the sum of the
character widths returned by a series of calls to <tt>glutStrokeWidth</tt>.
The width of nonexistent characters is counted to be the width
@ -2007,12 +2040,38 @@ of an asterisk. </p>
one or more carriage returns, <i>freeglut</i> calculates the widths in pixels
of the lines separately and returns the largest width. </p>
<p><b>Changes From GLUT</b></p>
<h2>14.11 glutStrokeLengthf</h2>
<p>GLUT does not include this function.
<p>
The <tt>glutStrokeLengthf</tt> function returns the width in model units of
a string of characters in the specified stroke font.
</p>
<h2>14.10 glutStrokeHeight</h2>
<p><b>Usage</b></p>
<p><tt>GLfloat glutStrokeLengthf ( void *font,
char *string );</tt> </p>
<p><tt>font </tt>The stroke
font to use in calculating the character width <br/>
<tt>string </tt>String of characters
whose width is to be calculated </p>
<p><b>Description</b></p>
<p>
The <tt>glutStrokeLengthf</tt> function returns the width in model units of the given character string in
the specified stroke font. The return value is equal to the sum of the
character widths returned by a series of calls to
<tt>glutStrokeWidthf</tt>. Function was included in an unreleased GLUT 3.8.
The width of nonexistent characters is counted to be the width
of an asterisk. </p>
<p>If the string contains
one or more carriage returns, <i>freeglut</i> calculates the widths in pixels
of the lines separately and returns the largest width. </p>
<h2>14.12 glutStrokeHeight</h2>
<p>
The <tt>glutStrokeHeight</tt> function returns the height in pixels of