11 #ifndef hifi_model_TextureMap_h
12 #define hifi_model_TextureMap_h
14 #include "gpu/Texture.h"
16 #include "Transform.h"
17 #include "MaterialMappingMode.h"
25 void setTextureSource(gpu::TextureSourcePointer& textureSource);
26 gpu::TextureSourcePointer getTextureSource()
const {
return _textureSource; }
28 bool isDefined()
const;
29 gpu::TextureView getTextureView()
const;
31 void setTextureTransform(
const Transform& texcoordTransform);
32 const Transform& getTextureTransform()
const {
return _texcoordTransform; }
34 void setMappingMode(MaterialMappingMode mode) { _mappingMode = mode; }
35 MaterialMappingMode getMappingMode()
const {
return _mappingMode; }
37 void setRepeat(
bool repeat) { _repeat = repeat; }
38 bool getRepeat()
const {
return _repeat; }
40 void setUseAlphaChannel(
bool useAlpha) { _useAlphaChannel = useAlpha; }
41 bool useAlphaChannel()
const {
return _useAlphaChannel; }
43 void setLightmapOffsetScale(
float offset,
float scale);
44 const glm::vec2& getLightmapOffsetScale()
const {
return _lightmapOffsetScale; }
47 gpu::TextureSourcePointer _textureSource;
49 Transform _texcoordTransform;
50 glm::vec2 _lightmapOffsetScale{ 0.0f, 1.0f };
51 MaterialMappingMode _mappingMode { MaterialMappingMode::UV };
52 bool _repeat {
true };
54 bool _useAlphaChannel{
false };
56 typedef std::shared_ptr< TextureMap > TextureMapPointer;