Cogs.Core
|
Public Member Functions | |
IOHandler (Context *context, ResourceStore *store) | |
bool | resolveFile (const Cogs::StringView &source, const Cogs::StringView &fileName, std::string &content) override |
Callback method used to resolve include statements in shader code and get the contents to include. | |
bool | openFile (const Cogs::StringView &fileName, std::string &content) override |
Callback method used to open files. | |
void | pushSearchPaths () override |
void | addSearchPath (const Cogs::StringView &path) override |
void | popSearchPaths () override |
std::string | getPath (FileType type, const std::string &fileName) const |
bool | exists (FileType type, const Cogs::StringView &fileName) override |
bool | writeBinaryFile (FileType type, const Cogs::StringView &fileName, const void *content, size_t contentSize) override |
bool | openBinaryFile (FileType type, const Cogs::StringView &fileName, std::vector< uint8_t > &content) override |
virtual bool | openFile (const StringView &fileName, std::string &content)=0 |
Callback method used to open files. | |
virtual bool | resolveFile (const StringView &source, const StringView &fileName, std::string &content)=0 |
Callback method used to resolve include statements in shader code and get the contents to include. | |
virtual bool | exists (FileType type, const StringView &fileName)=0 |
virtual bool | writeBinaryFile (FileType type, const StringView &fileName, const void *content, size_t contentSize)=0 |
virtual bool | openBinaryFile (FileType type, const StringView &fileName, std::vector< uint8_t > &content)=0 |
virtual void | pushSearchPaths ()=0 |
virtual void | addSearchPath (const StringView &path)=0 |
virtual void | popSearchPaths ()=0 |
Public Attributes | |
Context * | context = nullptr |
ResourceStore * | store = nullptr |
Additional Inherited Members | |
![]() | |
enum class | FileType { ShaderDump = 0 , ShaderCache , PipelineCache } |
Definition at line 181 of file ResourceStore.cpp.
|
inline |
Definition at line 183 of file ResourceStore.cpp.
|
inlineoverridevirtual |
Implements Cogs::IIOHandler.
Definition at line 215 of file ResourceStore.cpp.
|
inlineoverridevirtual |
Implements Cogs::IIOHandler.
Definition at line 236 of file ResourceStore.cpp.
|
inline |
Definition at line 222 of file ResourceStore.cpp.
|
inlineoverridevirtual |
Implements Cogs::IIOHandler.
Definition at line 256 of file ResourceStore.cpp.
|
inlineoverridevirtual |
Callback method used to open files.
fileName | File name of the file that should be opened. |
content | Reference to a string that should receive the contents of the file. |
Implements Cogs::IIOHandler.
Definition at line 208 of file ResourceStore.cpp.
References resolveFile().
|
inlineoverridevirtual |
Implements Cogs::IIOHandler.
Definition at line 220 of file ResourceStore.cpp.
|
inlineoverridevirtual |
Implements Cogs::IIOHandler.
Definition at line 213 of file ResourceStore.cpp.
|
inlineoverridevirtual |
Callback method used to resolve include statements in shader code and get the contents to include.
source | Name of the source being compiled. This can e.g. be used to lookup include files based on the path of the currently compiling file. |
fileName | File name of the file that is being resolved. |
content | Reference to a string that should receive the contents of the file. |
Implements Cogs::IIOHandler.
Definition at line 188 of file ResourceStore.cpp.
References Cogs::Core::ResourceStore::getResourceContents().
Referenced by openFile().
|
inlineoverridevirtual |
Implements Cogs::IIOHandler.
Definition at line 243 of file ResourceStore.cpp.
Context* Cogs::Core::IOHandler::context = nullptr |
Definition at line 267 of file ResourceStore.cpp.
ResourceStore* Cogs::Core::IOHandler::store = nullptr |
Definition at line 268 of file ResourceStore.cpp.