17#define OSG_TEXTURE1D 1
22 #define GL_TEXTURE_1D 0x0DE0
#define GL_TEXTURE_1D
Definition Texture1D:22
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
Base class for state attributes.
Definition StateAttribute:77
@ TEXTURE
Definition StateAttribute:125
unsigned int & getModifiedCount(unsigned int contextID) const
Definition Texture1D:72
const Image * getImage() const
Gets the const texture image.
Definition Texture1D:65
void setSubloadCallback(SubloadCallback *cb)
Definition Texture1D:109
virtual Image * getImage(unsigned int)
Gets the texture image, ignoring face.
Definition Texture1D:83
void allocateMipmap(State &state) const
Allocate mipmap levels of the texture by subsequent calling of glTexImage* function.
SubloadCallback * getSubloadCallback()
Definition Texture1D:111
GLsizei _numMipmapLevels
Number of mipmap levels created.
Definition Texture1D:164
Texture1D(const osg::ref_ptr< T > &image)
Definition Texture1D:39
ref_ptr< Image > _image
It's not ideal that _image is mutable, but it's required since Image::ensureDimensionsArePowerOfTwo()...
Definition Texture1D:158
META_StateAttribute(osg, Texture1D, TEXTURE)
virtual void apply(State &state) const
Bind the texture object.
Image * getImage()
Gets the texture image.
Definition Texture1D:62
virtual GLenum getTextureTarget() const
Definition Texture1D:54
void setNumMipmapLevels(unsigned int num) const
Helper function.
Definition Texture1D:119
virtual const Image * getImage(unsigned int) const
Gets the const texture image, ignoring face.
Definition Texture1D:86
void applyTexImage1D(GLenum target, Image *image, State &state, GLsizei &width, GLsizei &numMipmapLevels) const
Helper method.
ImageModifiedCount _modifiedCount
Definition Texture1D:169
buffered_value< unsigned int > ImageModifiedCount
Definition Texture1D:168
GLsizei _textureWidth
Subloaded images can have different texture and image sizes.
Definition Texture1D:161
virtual int compare(const StateAttribute &rhs) const
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
Texture1D(const Texture1D &text, const CopyOp ©op=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
virtual int getTextureDepth() const
Definition Texture1D:99
void setTextureWidth(int width)
Sets the texture width.
Definition Texture1D:94
virtual int getTextureWidth() const
Gets the texture width.
Definition Texture1D:97
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 Texture1D:69
ref_ptr< SubloadCallback > _subloadCallback
Definition Texture1D:166
virtual unsigned int getNumImages() const
Gets the number of images that can be assigned to the Texture.
Definition Texture1D:89
virtual int getTextureHeight() const
Definition Texture1D:98
void copyTexImage1D(State &state, int x, int y, int width)
Copies pixels into a 1D texture image, as per glCopyTexImage1D.
const SubloadCallback * getSubloadCallback() const
Definition Texture1D:113
void setImage(Image *image)
Sets the texture image.
void copyTexSubImage1D(State &state, int xoffset, int x, int y, int width)
Copies a one-dimensional texture subimage, as per glCopyTexSubImage1D.
virtual void computeInternalFormat() const
void setImage(const ref_ptr< T > &image)
Definition Texture1D:59
virtual void setImage(unsigned int, Image *image)
Sets the texture image, ignoring face.
Definition Texture1D:80
unsigned int getNumMipmapLevels() const
Gets the number of mipmap levels created.
Definition Texture1D:122
virtual void load(const Texture1D &texture, State &state) const =0
virtual void subload(const Texture1D &texture, State &state) const =0
#define OSG_EXPORT
Definition Export:39