class SG_EXPORT osg::Texture: public Object

Texture state class which encapsulates OpenGl texture functionality

Inheritance:


Public Classes

[more]enum WrapParameter
[more]enum WrapMode
[more]enum FilterParameter
[more]enum FilterMode

Public Methods

[more] Texture()
[more]static Texture* instance()
[more]virtual Object* clone() const
[more]virtual bool isSameKindAs(Object* obj)
[more]virtual const char* className() const
[more]void setImage(Image* image)
Set the texture image.
[more]Image* getImage() const
Get the texture image.
[more]void setWrap(WrapParameter which, WrapMode wrap)
Set the texture wrap mode
[more]WrapMode getWrap(WrapParameter which) const
Get the texture wrap mode
[more]void setFilter(FilterParameter which, FilterMode filter)
Set the texture filter mode
[more]FilterMode getFilter(FilterParameter which) const
Get the texture filter mode
[more]static void enable( void )
Enable OpenGL texturing
[more]static void disable( void )
Disable OpenGL texturing
[more]void apply( void )
On first apply, create the minmapped texture and bind it, subsequent apply will simple bind to texture

Protected Fields

[more]uint _handle
[more]ref_ptr<Image> _image
[more]WrapMode _wrap_s
[more]WrapMode _wrap_t
[more]WrapMode _wrap_r
[more]FilterMode _min_filter
[more]FilterMode _mag_filter

Protected Methods

[more]virtual ~Texture()
[more]virtual bool readLocalData(Input& fr)
[more]virtual bool writeLocalData(Output& fw)
[more]bool matchWrapStr(const char* str, WrapMode& wrap)
[more]const char* getWrapStr(WrapMode wrap)
[more]bool matchFilterStr(const char* str, FilterMode& filter)
[more]const char* getFilterStr(FilterMode filter)


Inherited from Object:

Public Methods

ovirtual Object* readClone(Input& fr)
ovirtual bool write(Output& fw)


Inherited from Referenced:

Public Methods

oReferenced& operator = (Referenced&)
ovoid ref()
ovoid unref()
oint referenceCount()

Protected Fields

oint _refCount


Documentation

Texture state class which encapsulates OpenGl texture functionality
o Texture()

ostatic Texture* instance()

ovirtual Object* clone() const

ovirtual bool isSameKindAs(Object* obj)

ovirtual const char* className() const

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

oImage* getImage() const
Get the texture image.

oenum WrapParameter

o WRAP_S

o WRAP_T

o WRAP_R

oenum WrapMode

o CLAMP

o REPEAT

ovoid setWrap(WrapParameter which, WrapMode wrap)
Set the texture wrap mode

oWrapMode getWrap(WrapParameter which) const
Get the texture wrap mode

oenum FilterParameter

o MIN_FILTER

o MAG_FILTER

oenum FilterMode

o LINEAR

o LINEAR_MIPMAP_LINEAR

o LINEAR_MIPMAP_NEAREST

o NEAREST

o NEAREST_MIPMAP_LINEAR

o NEAREST_MIPMAP_NEAREST

ovoid setFilter(FilterParameter which, FilterMode filter)
Set the texture filter mode

oFilterMode getFilter(FilterParameter which) const
Get the texture filter mode

ostatic void enable( void )
Enable OpenGL texturing

ostatic void disable( void )
Disable OpenGL texturing

ovoid apply( void )
On first apply, create the minmapped texture and bind it, subsequent apply will simple bind to texture

ovirtual ~Texture()

ovirtual bool readLocalData(Input& fr)

ovirtual bool writeLocalData(Output& fw)

ouint _handle

oref_ptr<Image> _image

obool matchWrapStr(const char* str, WrapMode& wrap)

oconst char* getWrapStr(WrapMode wrap)

obool matchFilterStr(const char* str, FilterMode& filter)

oconst char* getFilterStr(FilterMode filter)

oWrapMode _wrap_s

oWrapMode _wrap_t

oWrapMode _wrap_r

oFilterMode _min_filter

oFilterMode _mag_filter


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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