Added support for automatic scaling of text to screen coords. Optimized
the text implementation to provide better speed, especially by using the alignement to screen option. Deprecated the Text::setFontSize(,) method, which is now being replaced by setFontResolution(,) Fixed typos in Texture*.cpp. Removed old deprecated methods from osg headers.
This commit is contained in:
@@ -23,7 +23,7 @@ using namespace osg;
|
||||
Texture2D::Texture2D():
|
||||
_textureWidth(0),
|
||||
_textureHeight(0),
|
||||
_numMimpmapLevels(0)
|
||||
_numMipmapLevels(0)
|
||||
{
|
||||
setUseHardwareMipMapGeneration(true);
|
||||
}
|
||||
@@ -33,7 +33,7 @@ Texture2D::Texture2D(const Texture2D& text,const CopyOp& copyop):
|
||||
_image(copyop(text._image.get())),
|
||||
_textureWidth(text._textureWidth),
|
||||
_textureHeight(text._textureHeight),
|
||||
_numMimpmapLevels(text._numMimpmapLevels),
|
||||
_numMipmapLevels(text._numMipmapLevels),
|
||||
_subloadCallback(text._subloadCallback)
|
||||
{
|
||||
}
|
||||
@@ -109,7 +109,7 @@ void Texture2D::apply(State& state) const
|
||||
else if (_image.valid() && getModifiedTag(contextID) != _image->getModifiedTag())
|
||||
{
|
||||
applyTexImage2D_subload(GL_TEXTURE_2D,_image.get(),state,
|
||||
_textureWidth, _textureHeight, _numMimpmapLevels);
|
||||
_textureWidth, _textureHeight, _numMipmapLevels);
|
||||
|
||||
// update the modified tag to show that it is upto date.
|
||||
getModifiedTag(contextID) = _image->getModifiedTag();
|
||||
@@ -143,7 +143,7 @@ void Texture2D::apply(State& state) const
|
||||
applyTexParameters(GL_TEXTURE_2D,state);
|
||||
|
||||
applyTexImage2D_load(GL_TEXTURE_2D,_image.get(),state,
|
||||
_textureWidth, _textureHeight, _numMimpmapLevels);
|
||||
_textureWidth, _textureHeight, _numMipmapLevels);
|
||||
|
||||
// update the modified tag to show that it is upto date.
|
||||
getModifiedTag(contextID) = _image->getModifiedTag();
|
||||
|
||||
Reference in New Issue
Block a user