5 #include "ITextureFileLoader.h"
9 #include "IJpegLoader.h"
10 #include "IPNGDecoder.h"
11 #include "UnityCallbacks.h"
12 #include "UnityMaterialToTextureMap.h"
20 using namespace Eegeo::Helpers;
42 TextureBuffer* AllocateTextureBuffer(
int size,
int width,
int height,
int format,
bool mipmap);
43 GLuint BeginUploadTextureBuffer(TextureBuffer* textureBuffer);
61 static GLenum CalcPNGGLPixelFormat(
int color_type);
64 Byte *CreateImageDataFromPngStream(std::istream& stream, u32& width, u32& height,
int& colorType, u32& size,
bool invertVertically);
76 GLuint GetTextureIDForMaterial(
const std::string& materialName);
77 void SetTextureForMaterial(
const std::string& materialName,
const GLuint textureID);
78 void ReleaseTexture(GLuint texureId);
82 virtual bool LoadFromBuffer(
Eegeo::Helpers::GLHelpers::TextureInfo& textureInfo,
const std::string& fileExtension,
const Byte* resourceBuffer,
size_t bufferSizeBytes,
bool mipmap =
false);
90 const std::string& fileName,
101 const std::string& fileExtension,
102 const std::vector<Byte>& resourceBuffer,
109 const std::vector<
const std::vector<Byte>*>& cubeFaceBuffers,