Addd support for maximum screen text size into osgText when auto scale to

screen is active.

Added osgautotransform demo.
This commit is contained in:
Robert Osfield
2003-05-01 21:06:18 +00:00
parent d2d9b97953
commit 895a722842
11 changed files with 836 additions and 9 deletions

View File

@@ -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();
}
}