Avoid name conflicts between Util and Windows function
GetWindow and SwapBuffers are function of Windows.h and using the same
name causes a compile error.
This commit also changes Util's GetProcTableAndDevice to CreateNXTDevice
because we might need to call NXT procs when creating the C++ device.
diff --git a/examples/HelloTriangle.cpp b/examples/HelloTriangle.cpp
index ae15469..cce22b1 100644
--- a/examples/HelloTriangle.cpp
+++ b/examples/HelloTriangle.cpp
@@ -14,7 +14,6 @@
#include "Utils.h"
-#include <unistd.h>
#include <vector>
nxt::Device device;
@@ -95,9 +94,7 @@
}
void init() {
- nxtProcTable procs;
- GetProcTableAndDevice(&procs, &device);
- nxtSetProcs(&procs);
+ device = CreateCppNXTDevice();
queue = device.CreateQueueBuilder().GetResult();
@@ -173,7 +170,7 @@
.GetResult();
queue.Submit(1, &commands);
- SwapBuffers();
+ DoSwapBuffers();
}
int main(int argc, const char* argv[]) {
@@ -184,7 +181,7 @@
while (!ShouldQuit()) {
frame();
- usleep(16000);
+ USleep(16000);
}
// TODO release stuff