All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ITextureFileLoader.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Helpers.h"
6 #include "Types.h"
7 #include "GLHelpers.h"
8 #include "ICallback.h"
9 #include "AsyncTexturing.h"
10 #include <string>
11 #include <vector>
12 
13 namespace Eegeo
14 {
15  namespace Helpers
16  {
18  {
19  public:
20  virtual ~ITextureFileLoader() { }
21 
22  virtual bool LoadTexture(
24  const std::string& fileName,
25  bool mipmap=false)=0;
26 
27  virtual Rendering::AsyncTexturing::IAsyncTextureLoad& LoadFromFileAsync(
29  const std::string& fileName,
30  void* pUserData,
31  bool mipmap=false)=0;
32 
33  virtual Rendering::AsyncTexturing::IAsyncTextureLoad& LoadCubeFromFileAsync(
35  const Helpers::CubeTextureName& textureName,
36  void* pUserData)=0;
37 
38  virtual bool LoadFromBuffer(
40  const std::string& fileExtension,
41  const Byte* resourceBuffer,
42  size_t bufferSizeBytes,
43  bool mipmap=false)=0;
44 
45  virtual Rendering::AsyncTexturing::IAsyncTextureLoad& LoadFromBufferAsync(
47  const std::string& fileExtension,
48  const std::vector<Byte>& resourceBuffer,
49  void* pUserData,
50  bool mipmap=false)=0;
51 
52  virtual Rendering::AsyncTexturing::IAsyncTextureLoad& LoadCubeFromBuffersAsync(
54  const std::vector<const std::vector<Byte>*>& cubeFaceBuffers,
55  void* pUserData
56  )=0;
57 
58  virtual bool LoadCubeTexture(
60  const CubeTextureName& cubeTextureName) = 0;
61 
62  virtual bool LoadFromCubeFaces(
64  const std::vector<const std::vector<Byte>*>& cubeFaceBuffers)=0;
65 
66  virtual bool LoadFromCubeFaces(
68  const CubeFaceFileNames& cubeFaceFileNames)=0;
69  };
70  }
71 }