15#define OSG_TEXTURE2D 1
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Implements a simple buffered value for values that need to be buffered on a per graphics context basi...
Definition buffered_value:27
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Image class for encapsulating the storage texture image data.
Definition Image:179
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
T * get() const
Definition ref_ptr:117
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
unsigned int getContextID() const
Get the current OpenGL context unique ID.
Definition State:114
Base class for state attributes.
Definition StateAttribute:77
@ TEXTURE
Definition StateAttribute:125
static osg::ref_ptr< TextureObject > generateTextureObject(const Texture *texture, unsigned int contextID, GLenum target)
void setUseHardwareMipMapGeneration(bool useHardwareMipMapGeneration)
Sets the hardware mipmap generation hint.
Definition Texture:550
virtual unsigned int getNumImages() const
Gets the number of images that can be assigned to the Texture.
Definition Texture2D:85
void setImage(unsigned int, const ref_ptr< T > &image)
Definition Texture2D:76
void setTextureSize(int width, int height) const
Sets the texture width and height.
Definition Texture2D:90
virtual int getTextureWidth() const
Definition Texture2D:99
unsigned int getNumMipmapLevels() const
Gets the number of mipmap levels created.
Definition Texture2D:134
virtual int getTextureDepth() const
Definition Texture2D:101
unsigned int & getModifiedCount(unsigned int contextID) const
Definition Texture2D:66
virtual const Image * getImage(unsigned int) const
Gets the const texture image, ignoring face.
Definition Texture2D:82
void setTextureHeight(int height)
Definition Texture2D:97
virtual void setImage(unsigned int, Image *image)
Sets the texture image, ignoring face.
Definition Texture2D:74
ref_ptr< Image > _image
Definition Texture2D:171
Texture2D(const osg::ref_ptr< T > &image)
Definition Texture2D:33
void setTextureWidth(int width)
Definition Texture2D:96
virtual Image * getImage(unsigned int)
Gets the texture image, ignoring face.
Definition Texture2D:79
void allocateMipmap(State &state) const
Allocate mipmap levels of the texture by subsequent calling of glTexImage* function.
GLsizei _textureHeight
Definition Texture2D:174
buffered_value< unsigned int > ImageModifiedCount
Definition Texture2D:181
GLsizei _textureWidth
Subloaded images can have different texture and image sizes.
Definition Texture2D:174
virtual int compare(const StateAttribute &rhs) const
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
virtual GLenum getTextureTarget() const
Definition Texture2D:50
void copyTexImage2D(State &state, int x, int y, int width, int height)
Copies pixels into a 2D texture image, as per glCopyTexImage2D.
Texture2D(const Texture2D &text, const CopyOp ©op=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
META_StateAttribute(osg, Texture2D, TEXTURE)
void setImage(Image *image)
Sets the texture image.
ImageModifiedCount _modifiedCount
Definition Texture2D:182
void copyTexSubImage2D(State &state, int xoffset, int yoffset, int x, int y, int width, int height)
Copies a two-dimensional texture subimage, as per glCopyTexSubImage2D.
virtual int getTextureHeight() const
Definition Texture2D:100
void setImage(const ref_ptr< T > &image)
Definition Texture2D:55
Image * getImage()
Gets the texture image.
Definition Texture2D:58
ref_ptr< SubloadCallback > _subloadCallback
Definition Texture2D:179
virtual bool isDirty(unsigned int contextID) const
return true if the texture image data has been modified and the associated GL texture object needs to...
Definition Texture2D:64
void setNumMipmapLevels(unsigned int num) const
Helper function.
Definition Texture2D:131
bool textureObjectValid(State &state) const
Return true of the TextureObject assigned to the context associate with osg::State object is valid.
GLsizei _numMipmapLevels
Number of mipmap levels created.
Definition Texture2D:177
void setSubloadCallback(SubloadCallback *cb)
Definition Texture2D:121
const Image * getImage() const
Gets the const texture image.
Definition Texture2D:61
virtual void apply(State &state) const
Bind the texture object.
virtual void computeInternalFormat() const
const SubloadCallback * getSubloadCallback() const
Definition Texture2D:125
SubloadCallback * getSubloadCallback()
Definition Texture2D:123
virtual osg::ref_ptr< TextureObject > generateTextureObject(const Texture2D &texture, State &state) const
Definition Texture2D:112
virtual void load(const Texture2D &texture, State &state) const =0
virtual void subload(const Texture2D &texture, State &state) const =0
virtual bool textureObjectValid(const Texture2D &texture, State &state) const
Definition Texture2D:107
#define OSG_EXPORT
Definition Export:39