mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
SampleUtils: print GLFW errors for debugging
This commit is contained in:
parent
e98678f886
commit
52cbcb4e47
@ -28,6 +28,10 @@ void PrintDeviceError(const char* message, nxt::CallbackUserdata) {
|
|||||||
std::cout << "Device error: " << message << std::endl;
|
std::cout << "Device error: " << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PrintGLFWError(int code, const char* message) {
|
||||||
|
std::cout << "GLFW error: " << code << " - " << message << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
enum class CmdBufType {
|
enum class CmdBufType {
|
||||||
None,
|
None,
|
||||||
Terrible,
|
Terrible,
|
||||||
@ -64,6 +68,7 @@ nxt::Device CreateCppNXTDevice() {
|
|||||||
return nxt::Device();
|
return nxt::Device();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glfwSetErrorCallback(PrintGLFWError);
|
||||||
if (!glfwInit()) {
|
if (!glfwInit()) {
|
||||||
return nxt::Device();
|
return nxt::Device();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user