6 #ifndef MATERIALX_IMAGEHANDLER_H
7 #define MATERIALX_IMAGEHANDLER_H
38 using ImageLoaderMap = std::unordered_map<string, std::vector<ImageLoaderPtr>>;
49 void setProperties(
const string& fileNameUniform,
84 bool enableMipmaps =
true;
88 Color4 defaultColor = { 0.0f, 0.0f, 0.0f, 1.0f };
146 bool verticalFlip =
false);
223 _resolver = resolver;
233 virtual bool createRenderResources(
ImagePtr image,
bool generateMipMaps,
bool useAsRenderTarget =
false);
237 virtual void releaseRenderResources(
ImagePtr image =
nullptr);
243 releaseRenderResources();
static const string TXT_EXTENSION
#define CLAMP(EXPR, TYPE)
ImagePtr getZeroImage() const
Return a fallback image with zeroes in all channels.
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
static const string GIF_EXTENSION
static const string EXR_EXTENSION
std::unordered_map< string, ImagePtr > ImageMap
A map from strings to images.
#define MATERIALX_NAMESPACE_BEGIN
StringResolverPtr _resolver
StringResolverPtr getFilenameResolver() const
Return the filename resolver for images.
GLsizei const GLchar *const * path
std::vector< ImagePtr > ImageVec
A vetor of images.
AddressMode vaddressMode
Address mode in V.
static ImageHandlerPtr create(ImageLoaderPtr imageLoader)
GLenum GLenum GLsizei void * image
Selectively extract and filter point data using a custom filter operator.
const FileSearchPath & getSearchPath() const
Return the image search path.
static const string TIFF_EXTENSION
std::unordered_map< string, std::vector< ImageLoaderPtr >> ImageLoaderMap
Map from strings to vectors of image loaders.
MX_RENDER_API const string FILTER_TYPE_SUFFIX
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMFUTIL_EXPORT void saveImage(const std::string &fileName, const Header &hdr, const Image &img, DataWindowSource dws=USE_IMAGE_DATA_WINDOW)
const StringSet & supportedExtensions() const
static const string PIC_EXTENSION
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
static const string PNG_EXTENSION
static const string TGA_EXTENSION
std::shared_ptr< ImageHandler > ImageHandlerPtr
Shared pointer to an ImageHandler.
MATERIALX_NAMESPACE_BEGIN MX_RENDER_API const string IMAGE_PROPERTY_SEPARATOR
static const string JPEG_EXTENSION
std::shared_ptr< ImageLoader > ImageLoaderPtr
Shared pointer to an ImageLoader.
void setSearchPath(const FileSearchPath &path)
Set the search path to be used for finding images on the file system.
MX_RENDER_API const string VADDRESS_MODE_SUFFIX
size_t operator()(const ImageSamplingProperties &k) const
AddressMode uaddressMode
Address mode in U.
static const string TX_EXTENSION
shared_ptr< StringResolver > StringResolverPtr
A shared pointer to a StringResolver.
MX_RENDER_API const string UADDRESS_MODE_SUFFIX
static const string TIF_EXTENSION
static const string TXR_EXTENSION
FileSearchPath _searchPath
ImageLoaderMap _imageLoaders
std::set< string > StringSet
A set of strings.
FilterType filterType
Filter type.
#define MATERIALX_NAMESPACE_END
static const string JPG_EXTENSION
shared_ptr< Image > ImagePtr
A shared pointer to an image.
static const string HDR_EXTENSION
static const string PSD_EXTENSION
shared_ptr< const Document > ConstDocumentPtr
A shared pointer to a const Document.
void setFilenameResolver(StringResolverPtr resolver)
Set the filename resolver for images.
static const string BMP_EXTENSION
Standard image file extensions.
shared_ptr< const Image > ConstImagePtr
A shared pointer to a const image.
bool enableMipmaps
Enable mipmaps.
MX_RENDER_API const string DEFAULT_COLOR_SUFFIX
IMFUTIL_EXPORT Image * loadImage(const std::string &fileName, Header &hdr)