Addd support for maximum screen text size into osgText when auto scale to
screen is active. Added osgautotransform demo.
This commit is contained in:
@@ -559,3 +559,27 @@ void Font::Glyph::subload() const
|
||||
"\t 0x"<<(unsigned int)data()<<");"<<dec<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void Font::Glyph::draw(osg::State& state) const
|
||||
{
|
||||
GLuint& globj = _globjList[state.getContextID()];
|
||||
|
||||
// call the globj if already set otherwise compile and execute.
|
||||
if( globj != 0 )
|
||||
{
|
||||
glCallList( globj );
|
||||
}
|
||||
else
|
||||
{
|
||||
globj = glGenLists( 1 );
|
||||
glNewList( globj, GL_COMPILE_AND_EXECUTE );
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT,getPacking());
|
||||
glDrawPixels(s(), t(),
|
||||
(GLenum)getPixelFormat(),
|
||||
(GLenum)getDataType(),
|
||||
data() );
|
||||
|
||||
glEndList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user