From Max, fixes to UniCode support for bitmap fonts.
This commit is contained in:
@@ -65,10 +65,33 @@ void FTGLBitmapFont::render( const wchar_t* string,unsigned int renderContext)
|
||||
|
||||
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE);
|
||||
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0);
|
||||
#if (FREETYPE_MAJOR >= 2) && (FREETYPE_MINOR>=1)
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 2);
|
||||
#else
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 1);
|
||||
#endif
|
||||
|
||||
FTFont::render( string,renderContext);
|
||||
|
||||
glPopClientAttrib();
|
||||
|
||||
}
|
||||
|
||||
// mrn@changes
|
||||
void FTGLBitmapFont::render( std::vector<int>::const_iterator first,
|
||||
std::vector<int>::const_iterator last,
|
||||
unsigned int renderContext)
|
||||
{
|
||||
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
|
||||
|
||||
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE);
|
||||
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0);
|
||||
#if (FREETYPE_MAJOR >= 2) && (FREETYPE_MINOR>=1)
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 2);
|
||||
#else
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 1);
|
||||
#endif
|
||||
|
||||
FTFont::render( first,last,renderContext);
|
||||
|
||||
glPopClientAttrib();
|
||||
}
|
||||
|
||||
@@ -43,6 +43,15 @@ class FTGL_EXPORT FTGLBitmapFont : public FTFont
|
||||
// mrn@changes
|
||||
void render( const wchar_t* string, unsigned int renderContext=0);
|
||||
|
||||
/**
|
||||
* Renders a string of characters
|
||||
*
|
||||
* @param string unicode string to be output.
|
||||
*/
|
||||
// mrn@changes
|
||||
void render( std::vector<int>::const_iterator first,
|
||||
std::vector<int>::const_iterator last,
|
||||
unsigned int renderContext=0);
|
||||
// attributes
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user