mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
Migrate to NanoGUI / Eigen for GUI and linear algebra.
Also introduce a GUI play/pause button.
This commit is contained in:
28
vis/include/cgl/error.hpp
Normal file
28
vis/include/cgl/error.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <nanogui/opengl.h>
|
||||
|
||||
namespace cgl {
|
||||
class GlError : public std::domain_error {
|
||||
public:
|
||||
explicit GlError(const std::string &arg) : domain_error(arg) {}
|
||||
|
||||
explicit GlError(const char *string) : domain_error(string) {}
|
||||
};
|
||||
|
||||
class ShaderError : public GlError {
|
||||
public:
|
||||
explicit ShaderError(const std::string &arg) : GlError(arg) {}
|
||||
|
||||
explicit ShaderError(const char *string) : GlError(string) {}
|
||||
};
|
||||
|
||||
class ProgramError : public GlError {
|
||||
public:
|
||||
explicit ProgramError(const std::string &arg) : GlError(arg) {}
|
||||
|
||||
explicit ProgramError(const char *string) : GlError(string) {}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user