This allows clients to provide their own asynchronous texture decoders for various mime-typed images. This is a plug-in component for gltfio, in some ways similar to MaterialProvider. There are two motivations for this: to decouple gltfio from STB and to make it easier to integrate support for BasisU textures. This also has the side effect of simplifying ResourceLoader, since the texture decoding jobs have been moved out. As part of this work, I made the "stb" CMake target into a traditional static library. Previously we had several files called `Image.cpp` whose sole purpose was to enable STB_IMAGE_IMPLEMENTATION.
10 lines
177 B
C++
10 lines
177 B
C++
#define STBI_NO_BMP
|
|
#define STBI_NO_PSD
|
|
#define STBI_NO_TGA
|
|
#define STBI_NO_GIF
|
|
#define STBI_NO_PIC
|
|
#define STBI_NO_PNM
|
|
|
|
#define STB_IMAGE_IMPLEMENTATION
|
|
#include "stb_image.h"
|