Experiment with output callbacks instead of handlers.

This commit is contained in:
castano
2010-05-18 17:13:30 +00:00
parent d38b89edc7
commit a32d780347
5 changed files with 93 additions and 105 deletions

View File

@ -55,18 +55,27 @@ namespace nvtt
nv::StdOutputStream stream;
};
struct OutputOptions::Private
{
nv::Path fileName;
OutputHandler * outputHandler;
ErrorHandler * errorHandler;
BeginImageCallback * beginImageCallback;
OutputCallback * outputCallback;
ErrorCallback * errorCallback;
bool outputHeader;
Container container;
bool hasValidOutputHandler() const;
void beginImage(int size, int width, int height, int depth, int face, int miplevel) const;
bool writeData(const void * data, int size) const;
void error(Error e) const;
};