Wide characters (16 bit) are already represented by a few areas of OpenGL. They have always been supported by GLUT's glutBitmapCharacter, although not by glutBitmapLength or glutStrokeLength. GLU now supports Unicode with gluErrorUnicodeString().
It is possible that many functions can already support wide characters using UTF-8, which can be passed as character pointers. Therefore, this entire proposal may not be essential for international language support. However, due to the complexity of parsing UTF-8, it is valuable to at least include Unicode support for text rendering functions.
Unicode functions should be available under the same name, with a common name modifier. Rather than Inserting the word "Unicode", this proposal defines functions with a less verbose modifier, a single letter 'W' appended to the standard function name, the standard used by Microsoft. If there are objections to the use of a Microsoft standard, a 'U' suffix could be used instead.
int glutCreateWindowW( const wchar_t *title ); void glutSetWindowTitleW( const wchar_t *title ); void glutSetIconTitleW( const wchar_t *title ); void glutAddMenuEntryW( const wchar_t *label, int value ); void glutAddSubMenuW( const wchar_t *label, int submenu ); void glutChangeToMenuEntryW( int item, const wchar_t *label, int value ); void glutChangeToSubMenuW( int item, const wchar_t *label, int submenu ); int glutExtensionSupportedW( const wchar_t *name ); int glutBitmapLengthW( void *font, const wchar_t *string ); int glutStrokeLengthW( void *font, const wchar_t *string ); float glutStrokeLengthfW( void *font, const wchar_t *string ); int glutBitmapStringW( void *font, const wchar_t *string );
Parameters: identical to the existinf GLUT API counterparts, with strings passed as wchar_t* instead of char*.
Unicode versions of glutInitDisplayString and glutInitDisplayModeString are not included, because the strings have a programmatic syntax, and are not displayed to the user.