class SG_EXPORT osg::Texture1D

Texture state class which encapsulates OpenGl 1D texture functionality

Inheritance:


Public Methods

[more] Texture1D()
[more] Texture1D(const Texture1D& text, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy
[more] META_StateAttribute(osg, Texture1D, TEXTURE)
[more]virtual int compare(const StateAttribute& rhs) const
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
[more]virtual void getAssociatedModes(std::vector<GLMode>& modes) const
[more]void setImage(Image* image)
Set the texture image.
[more]Image* getImage()
Get the texture image.
[more]inline const Image* getImage() const
Get the const texture image.
[more]inline void setTextureSize(int width) const
Set the texture width and height.
[more]inline void getTextureSize(int& width) const
Get the texture subload width.
[more]void setSubloadCallback(SubloadCallback* cb)
[more]SubloadCallback* getSubloadCallback()
[more]const SubloadCallback* getSubloadCallback() const
[more]void setNumMipmapLevels(unsigned int num) const
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
[more]unsigned int getNumMipmapLevels() const
Get the number of mip map levels the the texture has been created with
[more]void copyTexImage1D(State& state, int x, int y, int width)
Copy pixels into a 1D texture imageAs per glCopyTexImage1D.
[more]void copyTexSubImage1D(State& state, int xoffset, int x, int y, int width)
Copy a one-dimensional texture subimage.
[more]virtual void apply(State& state) const
On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture

Public Members

class SubloadCallback: public Referenced

Protected Fields

[more]mutable ref_ptr<Image> _image
[more]mutable GLsizei _textureWidth
[more]mutable GLsizei _numMimpmapLevels
[more]ref_ptr<SubloadCallback> _subloadCallback

Protected Methods

[more]virtual ~Texture1D()
[more]virtual void computeInternalFormat() const
[more]void applyTexImage1D(GLenum target, Image* image, State& state, GLsizei& width, GLsizei& numMimpmapLevels) const
Helper method which does the creation of the texture itself, and does not set or use texture binding.


Inherited from Texture:

Public Methods

ovirtual osg::Object* cloneType() const
ovirtual osg::Object* clone(const CopyOp& copyop) const
ovirtual bool isSameKindAs(const osg::Object* obj) const
ovirtual const char* libraryName() const
ovirtual const char* className() const
ovirtual Type getType() const
ovirtual bool isTextureAttribute() const
ovoid setWrap(WrapParameter which, WrapMode wrap)
oWrapMode getWrap(WrapParameter which) const
ovoid setBorderColor(const Vec4& color)
oconst Vec4& getBorderColor() const
ovoid setFilter(FilterParameter which, FilterMode filter)
oFilterMode getFilter(FilterParameter which) const
ovoid setMaxAnisotropy(float anis)
oinline float getMaxAnisotropy() const
oinline void setInternalFormatMode(InternalFormatMode mode)
oinline InternalFormatMode getInternalFormatMode() const
oinline void setInternalFormat(GLint internalFormat)
oinline GLint getInternalFormat() const
obool isCompressedInternalFormat() const
oinline GLuint& getTextureObject(uint contextID) const
oinline uint& getModifiedTag(uint contextID) const
oinline uint& getTextureParameterDity(uint contextID) const
ovoid dirtyTextureObject()
ovoid dirtyTextureParameters()
ostatic void deleteTextureObject(uint contextID, GLuint handle)
ostatic void flushDeletedTextureObjects(uint contextID)
ovirtual void compile(State& state) const
ostatic const Extensions* getExtensions(uint contextID, bool createIfNotInitalized)
ostatic void setExtensions(uint contextID, Extensions* extensions)

Public Members

oenum WrapParameter
oenum WrapMode
oenum FilterParameter
oenum FilterMode
oenum InternalFormatMode
o Get the handle to the texture object for the current context
class Extensions: public osg::Referenced
Extensions class which encapsulates the querring of extensions and associated function pointers, and provide convinience wrappers to check for the extensions or use the associated functions

Protected Fields

omutable TextureNameList _handleList
omutable ImageModifiedTag _modifiedTag
omutable TexParameterDirtyList _texParametersDirtyList
oWrapMode _wrap_s
oWrapMode _wrap_t
oWrapMode _wrap_r
oFilterMode _min_filter
oFilterMode _mag_filter
ofloat _maxAnisotropy
oVec4 _borderColor
oInternalFormatMode _internalFormatMode
omutable GLint _internalFormat

Protected Methods

ovoid computeInternalFormatWithImage(osg::Image& image) const
obool isCompressedInternalFormat(GLint internalFormat) const
ovoid applyTexParameters(GLenum target, State& state) const
ovoid applyTexImage2D(GLenum target, Image* image, State& state, GLsizei& width, GLsizei& height, GLsizei& numMimpmapLevels) const
oint compareTexture(const Texture& rhs) const

Protected Members

otypedef buffered_value<GLuint> TextureNameList
otypedef buffered_value<uint> ImageModifiedTag
otypedef buffered_value<uint> TexParameterDirtyList


Inherited from StateAttribute:

Public Methods

obool operator < (const StateAttribute& rhs) const
obool operator == (const StateAttribute& rhs) const
obool operator != (const StateAttribute& rhs) const

Public Members

otypedef GLenum GLMode
otypedef unsigned int GLModeValue
otypedef unsigned int OverrideValue
oenum Values
otypedef unsigned int Type
oenum Types


Inherited from Object:

Public Methods

oinline void setDataVariance(const DataVariance dv)
oinline const DataVariance getDataVariance() const
oinline void setUserData(Referenced* obj)
oinline Referenced* getUserData()
oinline const Referenced* getUserData() const

Public Members

oenum DataVariance

Protected Fields

oDataVariance _dataVariance
oref_ptr<Referenced> _userData


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline void unref_nodelete() const
oinline int referenceCount() const
oinline static int createdCount()
oinline static int deletedCount()

Protected Fields

omutable int _refCount
ostatic int _createdCount
ostatic int _deletedCount


Documentation

Texture state class which encapsulates OpenGl 1D texture functionality
o Texture1D()

o Texture1D(const Texture1D& text, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy

o META_StateAttribute(osg, Texture1D, TEXTURE)

ovirtual int compare(const StateAttribute& rhs) const
return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs

ovirtual void getAssociatedModes(std::vector<GLMode>& modes) const

ovoid setImage(Image* image)
Set the texture image.

oImage* getImage()
Get the texture image.

oinline const Image* getImage() const
Get the const texture image.

oinline void setTextureSize(int width) const
Set the texture width and height. If width or height are zero then the repsective size value is calculated from the source image sizes.

oinline void getTextureSize(int& width) const
Get the texture subload width.

ovoid setSubloadCallback(SubloadCallback* cb)

oSubloadCallback* getSubloadCallback()

oconst SubloadCallback* getSubloadCallback() const

ovoid setNumMipmapLevels(unsigned int num) const
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

ounsigned int getNumMipmapLevels() const
Get the number of mip map levels the the texture has been created with

ovoid copyTexImage1D(State& state, int x, int y, int width)
Copy pixels into a 1D texture imageAs per glCopyTexImage1D. Creates an OpenGL texture object from the current OpenGL background framebuffer contents at pos \a x, \a y with width \a width. \a width must be a power of two.

ovoid copyTexSubImage1D(State& state, int xoffset, int x, int y, int width)
Copy a one-dimensional texture subimage. As per glCopyTexSubImage1D. Updates portion of an existing OpenGL texture object from the current OpenGL background framebuffer contents at pos \a x, \a y with width \a width.

ovirtual void apply(State& state) const
On first apply (unless already compiled), create the minmapped texture and bind it, subsequent apply will simple bind to texture

ovirtual ~Texture1D()

ovirtual void computeInternalFormat() const

ovoid applyTexImage1D(GLenum target, Image* image, State& state, GLsizei& width, GLsizei& numMimpmapLevels) const
Helper method which does the creation of the texture itself, and does not set or use texture binding.

omutable ref_ptr<Image> _image

omutable GLsizei _textureWidth

omutable GLsizei _numMimpmapLevels

oref_ptr<SubloadCallback> _subloadCallback


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.