Improved resizeGLObjectBuffers support
This commit is contained in:
@@ -239,6 +239,12 @@ public:
|
||||
|
||||
virtual void apply(osg::State& state) const;
|
||||
|
||||
/** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/
|
||||
virtual void setThreadSafeRefUnref(bool threadSafe);
|
||||
|
||||
/** Resize any per context GLObject buffers to specified size. */
|
||||
virtual void resizeGLObjectBuffers(unsigned int maxSize);
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~GlyphTexture();
|
||||
|
||||
@@ -655,6 +655,18 @@ void Font::GlyphTexture::apply(osg::State& state) const
|
||||
|
||||
}
|
||||
|
||||
void Font::GlyphTexture::setThreadSafeRefUnref(bool threadSafe)
|
||||
{
|
||||
osg::Texture2D::setThreadSafeRefUnref(threadSafe);
|
||||
}
|
||||
|
||||
void Font::GlyphTexture::resizeGLObjectBuffers(unsigned int maxSize)
|
||||
{
|
||||
osg::Texture2D::resizeGLObjectBuffers(maxSize);
|
||||
_glyphsToSubload.resize(maxSize);
|
||||
}
|
||||
|
||||
|
||||
// all the methods in Font::Glyph have been made non inline because VisualStudio6.0 is STUPID, STUPID, STUPID PILE OF JUNK.
|
||||
Font::Glyph::Glyph() {}
|
||||
Font::Glyph::~Glyph() {}
|
||||
|
||||
@@ -1475,8 +1475,8 @@ void Text::drawImplementation(osg::State& state, const osg::Vec4& colorMultiplie
|
||||
const osg::Viewport* viewport = state.getCurrentViewport();
|
||||
if (viewport)
|
||||
{
|
||||
width = viewport->width();
|
||||
height = viewport->height();
|
||||
width = static_cast<int>(viewport->width());
|
||||
height = static_cast<int>(viewport->height());
|
||||
}
|
||||
|
||||
bool doUpdate = atc._traversalNumber==-1;
|
||||
|
||||
Reference in New Issue
Block a user