Initial checkin of v1.04 - KTX file format support, basic ETC1 compression/decompression, Linux makefile with proper gcc options, lots of high-level improvements to get crnlib into a state where I can more easily add additional formats.

This commit is contained in:
richgel99@gmail.com
2012-11-25 08:41:25 +00:00
parent a8011e9d7f
commit f71b49be60
92 changed files with 20362 additions and 781 deletions
+18
View File
@@ -42,4 +42,22 @@ namespace crnlib
bool m_stopped : 1;
};
// Prints object's lifetime to stdout
class timed_scope
{
const char* m_pName;
timer m_tm;
public:
inline timed_scope(char* pName = "timed_scope") : m_pName(pName) { m_tm.start(); }
inline double get_elapsed_secs() const { return m_tm.get_elapsed_secs(); }
inline double get_elapsed_ms() const { return m_tm.get_elapsed_ms(); }
const timer &get_timer() const { return m_tm; }
timer &get_timer() { return m_tm; }
inline ~timed_scope() { double secs = m_tm.get_elapsed_secs(); printf("%s: %f secs, %f ms\n", m_pName, secs, secs * 1000.0f); }
};
} // namespace crnlib