Added a getModeUsage() method that prevents any mode being automatically associated with these Texture types that are only usable using non fixed function pipeline.
This commit is contained in:
@@ -42,6 +42,9 @@ class OSG_EXPORT Texture2DArray : public Texture
|
||||
|
||||
virtual GLenum getTextureTarget() const { return GL_TEXTURE_2D_ARRAY_EXT; }
|
||||
|
||||
/** Texture2DArray is related to non fixed pipeline usage only so isn't appropriate to enable/disable.*/
|
||||
virtual bool getModeUsage(StateAttribute::ModeUsage&) const { return false; }
|
||||
|
||||
/** Set the texture image for specified layer. */
|
||||
virtual void setImage(unsigned int layer, Image* image);
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@ class OSG_EXPORT Texture2DMultisample : public Texture
|
||||
return GL_TEXTURE_2D_MULTISAMPLE;
|
||||
}
|
||||
|
||||
/** Texture2DMultisample is related to non fixed pipeline usage only so isn't appropriate to enable/disable.*/
|
||||
virtual bool getModeUsage(StateAttribute::ModeUsage&) const { return false; }
|
||||
|
||||
/** Sets the texture width and height. If width or height are zero,
|
||||
* calculate the respective value from the source image size. */
|
||||
inline void setTextureSize(int width, int height) const
|
||||
|
||||
Reference in New Issue
Block a user