#include <OSGSimpleTexturedMaterial.h>
Inheritance diagram for osg::SimpleTexturedMaterial:

A osg::SimpleMaterial with an added texture. It doesn't expose all features of the texture, just the ones needed most often.
osg::SimpleTexturedMaterial::_sfImage defines the texture, osg::SimpleTexturedMaterial::_sfMinFilter and osg::SimpleTexturedMaterial::_sfMagFilter the used filters and osg::SimpleTexturedMaterial::_sfEnvMode the environment mode. As a special case osg::SimpleTexturedMaterial::_sfEnvMap can be used to use the txture as a spherical environment map.
Definition at line 58 of file OSGSimpleTexturedMaterial.h.
|
|
Reimplemented from osg::SimpleTexturedMaterialBase. Definition at line 131 of file OSGSimpleTexturedMaterial.h. |
|
|
Reimplemented from osg::SimpleMaterialBase. Definition at line 94 of file OSGSimpleTexturedMaterialBase.h. |
|
|
Reimplemented from osg::SimpleMaterialBase. Definition at line 96 of file OSGSimpleTexturedMaterialBase.h. 00097 { 00098 ImageFieldId = Inherited::NextFieldId, 00099 MinFilterFieldId = ImageFieldId + 1, 00100 MagFilterFieldId = MinFilterFieldId + 1, 00101 EnvModeFieldId = MagFilterFieldId + 1, 00102 EnvMapFieldId = EnvModeFieldId + 1, 00103 NextFieldId = EnvMapFieldId + 1 00104 };
|
|
|
Definition at line 83 of file OSGSimpleTexturedMaterial.cpp. 00083 : 00084 Inherited() 00085 { 00086 }
|
|
|
Definition at line 88 of file OSGSimpleTexturedMaterial.cpp. 00089 : 00090 00091 Inherited(source) 00092 { 00093 }
|
|
|
Definition at line 95 of file OSGSimpleTexturedMaterial.cpp. References _texGenChunk, _textureChunk, and osg::subRefCP(). 00096 { 00097 subRefCP(_textureChunk); 00098 subRefCP(_texGenChunk); 00099 }
|
|
||||||||||||
|
||||||||||||
|
Reimplemented from osg::SimpleMaterial. Definition at line 203 of file OSGSimpleTexturedMaterial.cpp. References SLOG. 00205 { 00206 SLOG << "Dump SimpleTexturedMaterial NI" << std::endl; 00207 }
|
|
|
Create a osg::State that represents this Material and return it. Reimplemented from osg::SimpleMaterial. Definition at line 173 of file OSGSimpleTexturedMaterial.cpp. References _texGenChunk, _textureChunk, osg::SimpleMaterial::makeState(), and prepareLocalChunks(). 00174 { 00175 StatePtr state = Inherited::makeState(); 00176 00177 prepareLocalChunks(); 00178 00179 state->addChunk(_textureChunk); 00180 state->addChunk(_texGenChunk); 00181 00182 return state; 00183 }
|
|
|
Rebuild the internal State. Just collects the chunks in the State. Reimplemented from osg::SimpleMaterial. Definition at line 185 of file OSGSimpleTexturedMaterial.cpp. References osg::Material::_pState, _texGenChunk, _textureChunk, prepareLocalChunks(), and osg::SimpleMaterial::rebuildState(). 00186 { 00187 Inherited::rebuildState(); 00188 00189 prepareLocalChunks(); 00190 00191 _pState->addChunk(_textureChunk); 00192 _pState->addChunk(_texGenChunk); 00193 }
|
|
|
Check if the Material (i.e. any of its chunks) is transparent.. Reimplemented from osg::SimpleMaterial. Definition at line 195 of file OSGSimpleTexturedMaterial.cpp. References osg::SimpleTexturedMaterialBase::getEnvMode(), osg::SimpleTexturedMaterialBase::getImage(), osg::SimpleMaterial::isTransparent(), and osg::NullFC. 00196 { 00197 return Inherited::isTransparent() || 00198 (getImage()!=NullFC && 00199 (getImage()->hasAlphaChannel() && getEnvMode() != GL_DECAL) 00200 ); 00201 }
|
|
|
As the image data can be manipulated by the user at any time, the system cannot know when that happens. Thus it has to be informed by the application when the texture data has chnaged and the texture needs to be rebuild. That's what imageChanged is for. Definition at line 54 of file OSGSimpleTexturedMaterial.inl. References _textureChunk. 00055 { 00056 _textureChunk->imageContentChanged(); 00057 }
|
|
|
Reimplemented from osg::SimpleMaterial. Definition at line 214 of file OSGSimpleTexturedMaterial.cpp. References _texGenChunk, _textureChunk, osg::addRefCP(), osg::TexGenChunkBase::create(), osg::TextureChunkBase::create(), and osg::NullFC. Referenced by changed(), makeState(), and rebuildState(). 00215 { 00216 if(_textureChunk == NullFC) 00217 { 00218 _textureChunk = TextureChunk::create(); 00219 00220 addRefCP(_textureChunk); 00221 } 00222 00223 if(_texGenChunk == NullFC) 00224 { 00225 _texGenChunk = TexGenChunk::create(); 00226 00227 addRefCP(_texGenChunk); 00228 } 00229 }
|
|
|
Reimplemented from osg::SimpleMaterial. Definition at line 103 of file OSGSimpleTexturedMaterial.cpp.
|
|
|
|
|
|
Reimplemented from osg::SimpleMaterialBase. Definition at line 58 of file OSGSimpleTexturedMaterialBase.inl. References osg::SimpleTexturedMaterialBase::_type. Referenced by osg::SimpleTexturedMaterialBase::create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::SimpleMaterialBase. Definition at line 65 of file OSGSimpleTexturedMaterialBase.inl. References osg::SimpleTexturedMaterialBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::SimpleMaterialBase. Definition at line 153 of file OSGSimpleTexturedMaterialBase.cpp. References osg::SimpleTexturedMaterialBase::_type. 00154 { 00155 return _type; 00156 }
|
|
|
Reimplemented from osg::SimpleMaterialBase. Definition at line 158 of file OSGSimpleTexturedMaterialBase.cpp. References osg::SimpleTexturedMaterialBase::_type. 00159 { 00160 return _type; 00161 }
|
|
|
Reimplemented from osg::SimpleMaterialBase. Definition at line 173 of file OSGSimpleTexturedMaterialBase.cpp. 00174 { 00175 return sizeof(SimpleTexturedMaterial); 00176 }
|