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:
@@ -192,24 +192,6 @@ class SG_EXPORT Drawable : public Object
|
||||
/** Get the non const UpdateCallback.*/
|
||||
UpdateCallback* getUpdateCallback() { return _updateCallback.get(); }
|
||||
|
||||
#ifdef USE_DEPRECATED_API
|
||||
struct AppCallback : public UpdateCallback
|
||||
{
|
||||
/** do customized app code.*/
|
||||
virtual void app(osg::NodeVisitor *visitor, osg::Drawable* drawable) = 0;
|
||||
|
||||
virtual void update(osg::NodeVisitor *visitor, osg::Drawable* drawable) { app(visitor,drawable); }
|
||||
};
|
||||
|
||||
/** deprecated.*/
|
||||
void setAppCallback(AppCallback* ac) { setUpdateCallback(ac); }
|
||||
|
||||
/** deprecated.*/
|
||||
AppCallback* getAppCallback() { return getUpdateCallback(); }
|
||||
|
||||
/** deprecated.*/
|
||||
const AppCallback* getAppCallback() const { return getUpdateCallback(); }
|
||||
#endif
|
||||
|
||||
struct CullCallback : public virtual osg::Referenced
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// define used to include in API which is being fazed out
|
||||
// if you can compile your apps with this turned off you are
|
||||
// well placed for compatablity with future versions.
|
||||
//#define USE_DEPRECATED_API
|
||||
#define USE_DEPRECATED_API
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( disable : 4244 )
|
||||
@@ -56,13 +56,4 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_DEPRECATED_API
|
||||
|
||||
#define osgNew new
|
||||
#define osgDelete delete
|
||||
#define osgFree free
|
||||
#define osgMalloc malloc
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -135,17 +135,6 @@ class SG_EXPORT Node : public Object
|
||||
/** Get const update node callback, called during update traversal. */
|
||||
inline const NodeCallback* getUpdateCallback() const { return _updateCallback.get(); }
|
||||
|
||||
#ifdef USE_DEPRECATED_API
|
||||
/** deprecated. */
|
||||
void setAppCallback(NodeCallback* nc) { setUpdateCallback(nc); }
|
||||
|
||||
/** deprecated. */
|
||||
inline NodeCallback* getAppCallback() { return getUpdateCallback(); }
|
||||
|
||||
/** deprecated. */
|
||||
inline const NodeCallback* getAppCallback() const { return getUpdateCallback(); }
|
||||
#endif
|
||||
|
||||
/** Get the number of Children of this node which require App traversal,
|
||||
* since they have an AppCallback attached to them or their children.*/
|
||||
inline unsigned int getNumChildrenRequiringUpdateTraversal() const { return _numChildrenRequiringUpdateTraversal; }
|
||||
|
||||
@@ -89,10 +89,10 @@ class SG_EXPORT Texture2D : public Texture
|
||||
|
||||
/** Set the number of mip map levels the the texture has been created with,
|
||||
should only be called within an osg::Texuture::apply() and custom OpenGL texture load.*/
|
||||
void setNumMipmapLevels(unsigned int num) const { _numMimpmapLevels=num; }
|
||||
void setNumMipmapLevels(unsigned int num) const { _numMipmapLevels=num; }
|
||||
|
||||
/** Get the number of mip map levels the the texture has been created with.*/
|
||||
unsigned int getNumMipmapLevels() const { return _numMimpmapLevels; }
|
||||
unsigned int getNumMipmapLevels() const { return _numMipmapLevels; }
|
||||
|
||||
|
||||
/** Copy pixels into a 2D texture image.As per glCopyTexImage2D.
|
||||
@@ -132,7 +132,7 @@ class SG_EXPORT Texture2D : public Texture
|
||||
mutable GLsizei _textureWidth, _textureHeight;
|
||||
|
||||
// number of mip map levels the the texture has been created with,
|
||||
mutable GLsizei _numMimpmapLevels;
|
||||
mutable GLsizei _numMipmapLevels;
|
||||
|
||||
ref_ptr<SubloadCallback> _subloadCallback;
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ class SG_EXPORT TextureCubeMap : public Texture
|
||||
|
||||
/** Set the number of mip map levels the the texture has been created with,
|
||||
should only be called within an osg::Texuture::apply() and custom OpenGL texture load.*/
|
||||
void setNumMipmapLevels(unsigned int num) const { _numMimpmapLevels=num; }
|
||||
void setNumMipmapLevels(unsigned int num) const { _numMipmapLevels=num; }
|
||||
|
||||
/** Get the number of mip map levels the the texture has been created with.*/
|
||||
unsigned int getNumMipmapLevels() const { return _numMimpmapLevels; }
|
||||
unsigned int getNumMipmapLevels() const { return _numMipmapLevels; }
|
||||
|
||||
/** On first apply (unless already compiled), create the minmapped
|
||||
* texture and bind it, subsequent apply will simple bind to texture.*/
|
||||
@@ -162,7 +162,7 @@ class SG_EXPORT TextureCubeMap : public Texture
|
||||
mutable GLsizei _textureWidth, _textureHeight;
|
||||
|
||||
// number of mip map levels the the texture has been created with,
|
||||
mutable GLsizei _numMimpmapLevels;
|
||||
mutable GLsizei _numMipmapLevels;
|
||||
|
||||
ref_ptr<SubloadCallback> _subloadCallback;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user