some new stuff.
idk its all pretty fun! some C++ too!
This commit is contained in:
22
simulations/mandelbrotset/cpp/main.cpp
Normal file
22
simulations/mandelbrotset/cpp/main.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <windows.h>
|
||||
#include "mandelbrot_app.h"
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
|
||||
// Check for DirectX 11 support
|
||||
if (FAILED(D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, 0, nullptr, 0,
|
||||
D3D11_SDK_VERSION, nullptr, nullptr, nullptr))) {
|
||||
MessageBox(nullptr, L"DirectX 11 is not available on this system.", L"Error", MB_OK | MB_ICONERROR);
|
||||
return 1;
|
||||
}
|
||||
|
||||
try {
|
||||
MandelbrotApp app(hInstance);
|
||||
app.Run();
|
||||
}
|
||||
catch (...) {
|
||||
MessageBox(nullptr, L"An unexpected error occurred.", L"Error", MB_OK | MB_ICONERROR);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user