fork download
  1. HWND game_window; // global game window handle
  2. HINSTANCE game_instance; // global game instance handle
  3. HDC game_dc; // global device context (GDI) handle
  4.  
  5. DEVMODE game_screen; // global for full screen mode
  6.  
  7. HGLRC game_rc; // global rendering context (OpenGL) handle
  8. HGLRC upload_rc; // global uploading context (OpenGL) handle
  9.  
  10. Zbool draw_ok; // for whether OpenGL init ok
  11. PIXELFORMATDESCRIPTOR pfd;
  12.  
  13. MSG msg; // generic message
  14.  
  15.  
  16. bool SetupOpenGLWindow() {
  17.  
  18. PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = nullptr;
  19. PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = nullptr;
  20.  
  21. // Save the game instance handle
  22. display.hinstance = game_instance = hinstance;
  23.  
  24. // Fill in the window class structure for testing display type.
  25. {
  26. WNDCLASSEX winclass; // this will hold the class we create
  27. winclass.cbSize = sizeof(WNDCLASSEX);
  28. winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
  29. winclass.lpfnWndProc = FakeWinProc;
  30. winclass.cbClsExtra = 0;
  31. winclass.cbWndExtra = 0;
  32. winclass.hInstance = hinstance;
  33. winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
  34. winclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
  35. winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
  36. winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
  37. winclass.lpszMenuName = NULL;
  38. winclass.lpszClassName = "Core";
  39.  
  40. // Register the window class
  41. if (!RegisterClassEx(&winclass)) {
  42. MessageBox(NULL, "RegisterClassEx() failed", "Could not create a suitable OpenGL window. Reason: RegisterClassEx(FakeWindow)", MB_OK);
  43. exit(1);
  44. }
  45. }
  46.  
  47. HWND fakeWND = CreateWindow(
  48. "Core", "Fake Window", // window class, title
  49. WS_CLIPSIBLINGS | WS_CLIPCHILDREN, // style
  50. 0, 0, // position x, y
  51. 1, 1, // width, height
  52. NULL, NULL, // parent window, menu
  53. hinstance, NULL // instance, param
  54. );
  55.  
  56. HDC fakeDC = GetDC(fakeWND); // Device Context
  57.  
  58. /*
  59. PIXELFORMATDESCRIPTOR fakePFD;
  60. ZeroMemory(&fakePFD, sizeof(fakePFD));
  61. fakePFD.nSize = sizeof(fakePFD);
  62. fakePFD.nVersion = 1;
  63. fakePFD.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
  64. fakePFD.iPixelType = PFD_TYPE_RGBA;
  65. fakePFD.cColorBits = 32;
  66. fakePFD.cAlphaBits = 8;
  67. fakePFD.cDepthBits = 24;
  68.   */
  69. PIXELFORMATDESCRIPTOR fakePFD =
  70. {
  71. sizeof(PIXELFORMATDESCRIPTOR),
  72. 1,
  73. PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, // Flags
  74. PFD_TYPE_RGBA, // The kind of framebuffer. RGBA or palette.
  75. 32, // Colordepth of the framebuffer.
  76. 0, 0, 0, 0, 0, 0,
  77. 0,
  78. 0,
  79. 0,
  80. 0, 0, 0, 0,
  81. 24, // Number of bits for the depthbuffer
  82. 8, // Number of bits for the stencilbuffer
  83. 0, // Number of Aux buffers in the framebuffer.
  84. PFD_MAIN_PLANE,
  85. 0,
  86. 0, 0, 0
  87. };
  88.  
  89. int fakePFDID = ChoosePixelFormat(fakeDC, &fakePFD);
  90. if (fakePFDID == 0) {
  91. MessageBox(NULL, "ChoosePixelFormat() failed", "Could not create a suitable OpenGL window. Reason: ChoosePixelFormat", MB_OK);
  92. exit(1);
  93. }
  94.  
  95. if (SetPixelFormat(fakeDC, fakePFDID, &fakePFD) == false) {
  96. MessageBox(NULL, "SetPixelFormat() failed", "Cannot create a suitable OpenGL Window. Reason: SetPixelFormat", MB_OK);
  97. exit(1);
  98. }
  99.  
  100. HGLRC fakeRC = wglCreateContext(fakeDC); // Rendering Context
  101.  
  102. if ( !fakeRC ) OUTPUT("Could not create fake Rendering Context!\n");
  103.  
  104. if (wglMakeCurrent(fakeDC, fakeRC) == false) {
  105. MessageBox(NULL, "wglMakeCurrent(wglMakeCurrent) failed", "Cannot create a suitable OpenGL Window. Reason: wglMakeCurrent", MB_OK);
  106. exit(1);
  107. }
  108.  
  109.  
  110. if ( !gl.getInfo() ) {
  111. MessageBox(NULL, "glGetInfo returned false", "Cannot create a suitable OpenGL Window. Reason: wglCreateContext", MB_OK);
  112. MessageBox(NULL, FMT("GLError = %d",glGetError()).c_str(), FMT("GLError = %d",glGetError()).c_str(), MB_OK );
  113. }
  114. // Get Our Pixel Format
  115. wglChoosePixelFormatARB = reinterpret_cast<PFNWGLCHOOSEPIXELFORMATARBPROC>(wglGetProcAddress("wglChoosePixelFormatARB"));
  116. if (wglChoosePixelFormatARB == nullptr) {
  117. MessageBox(NULL, "wglGetProcAddress(wglChoosePixelFormatARB) failed", "Cannot create a suitable OpenGL Window. Reason: wglChoosePixelFormatARB", MB_OK);
  118. MessageBox(NULL, FMT("GLError = %d",glGetError()).c_str(), FMT("GLError = %d",glGetError()).c_str(), MB_OK );
  119. exit(1);
  120. }
  121.  
  122. wglCreateContextAttribsARB = reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>(wglGetProcAddress("wglCreateContextAttribsARB"));
  123. if (wglCreateContextAttribsARB == nullptr) {
  124. MessageBox(NULL, "wglGetProcAddress(wglCreateContextAttribsARB) failed", "Cannot create a suitable OpenGL Window. Reason: wglCreateContextAttribsARB", MB_OK);
  125. MessageBox(NULL, FMT("GLError = %d",glGetError()).c_str(), FMT("GLError = %d",glGetError()).c_str(), MB_OK );
  126. exit(1);
  127. }
  128.  
  129. if (fakeRC == 0) {
  130. MessageBox(NULL, "wglCreateContext(wglCreateContext) failed", "Cannot create a suitable OpenGL Window. Reason: wglCreateContext", MB_OK);
  131. exit(1);
  132. }
  133.  
  134. OUTPUT("SetupOpenGLWindow() fakeRC created!\n");
  135.  
  136. // Detect the display size and create the final display profile
  137.  
  138. // Adjust Window
  139. int xPos = GetSystemMetrics(SM_CXSCREEN) - display.w;
  140. int yPos = GetSystemMetrics(SM_CYSCREEN) - display.h;
  141.  
  142. bool opt_borderless = CmdLine.Option("-borderless");
  143. bool opt_bordered = CmdLine.Option("-bordered");
  144. bool opt_recenter = CmdLine.Option("-recenter");
  145.  
  146. DWORD winExStyle =
  147. WS_EX_APPWINDOW |
  148. WS_EX_TOPMOST
  149. /*|
  150. WS_EX_ACCEPTFILES*/;
  151.  
  152. DWORD winStyle =
  153. CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW | (
  154. (gl.borderless || opt_borderless) ? (WS_POPUPWINDOW | WS_VISIBLE) :
  155. (gl.noFullscreen ? ((opt_bordered ? WS_BORDER : 0) | WS_VISIBLE) : (WS_POPUP | WS_VISIBLE)) // use POPUP for full screen
  156. )
  157. ;
  158.  
  159. // Fill in the window class structure
  160. {
  161. WNDCLASSEX winclass; // this will hold the class we create
  162. winclass.cbSize = sizeof(WNDCLASSEX);
  163. winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
  164. winclass.lpfnWndProc = WinProc;
  165. winclass.cbClsExtra = 0;
  166. winclass.cbWndExtra = 0;
  167. winclass.hInstance = hinstance;
  168. winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
  169. winclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
  170. winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
  171. winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
  172. winclass.lpszMenuName = NULL;
  173. winclass.lpszClassName = "Final";
  174.  
  175. // Register the window class
  176. if (!RegisterClassEx(&winclass)) {
  177. MessageBox(NULL, "RegisterClassEx(RealWindow) failed", "Could not create a suitable OpenGL window. Reason: RegisterClassEx(RealWindow)", MB_OK);
  178. exit(1);
  179. }
  180. }
  181.  
  182. // Create the window
  183. game_window = CreateWindowEx(
  184. winExStyle, // extended style
  185. "Core", // class
  186. gl.winTitle.c_str(), // title
  187. winStyle,
  188. gl.noFullscreen && !opt_recenter ? xPos / 2 : 0,
  189. gl.noFullscreen && !opt_recenter ? yPos / 2 : 0, // initial game window x,y
  190. display.w, // initial game width
  191. display.h, // initial game height
  192. HWND_DESKTOP, // handle to parent
  193. NULL, // handle to menu
  194. hinstance, // instance of this application
  195. NULL // extra creation parms
  196. );
  197. if (!game_window) {
  198. MessageBox(NULL, getLastErrorText().c_str(), "CreateWindowEx Error Text", MB_OK);
  199. MessageBox(NULL, "CreateWindowEx failed", "WinAPI ERROR: Could not open window. Reason: CreateWindowEx", MB_OK);
  200. exit(1);
  201. }
  202.  
  203.  
  204. gl.getInfo();
  205. #if !defined(USE_WGLEW)
  206. wglMakeCurrent(NULL, NULL);
  207. wglDeleteContext(fakeRC);
  208. ReleaseDC(fakeWND, fakeDC);
  209. // ignoreQuit = true;
  210. DestroyWindow(fakeWND);
  211. // ignoreQuit = false;
  212. #endif
  213.  
  214. if (gl.borderless || opt_borderless) {
  215. OUTPUT("SetupOpenGLWindow(): Borderless Option Enabled\n");
  216. LONG lStyle = GetWindowLong(game_window, GWL_STYLE);
  217. lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
  218. SetWindowLong(game_window, GWL_STYLE, lStyle);
  219. LONG lExStyle = GetWindowLong(game_window, GWL_EXSTYLE);
  220. lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
  221. SetWindowLong(game_window, GWL_EXSTYLE, lExStyle);
  222. SetWindowPos(game_window, NULL, 0, 0, display.w, display.h, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
  223. }
  224.  
  225. // Account For Window Borders
  226. RECT windowRect = { 0, 0, display.w, display.h }; // Define Our Window Coordinates
  227. AdjustWindowRectEx(&windowRect, WS_POPUP, 0, winStyle);
  228.  
  229. game_dc = GetDC(game_window);
  230.  
  231. float fAttributes[] = { 0,0 };
  232. int iAttributes[] = {
  233. WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
  234. WGL_SUPPORT_OPENGL_ARB,GL_TRUE,
  235. WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
  236. WGL_COLOR_BITS_ARB,24,
  237. WGL_ALPHA_BITS_ARB,8,
  238. WGL_DEPTH_BITS_ARB,24,
  239. WGL_STENCIL_BITS_ARB,8,
  240. WGL_DOUBLE_BUFFER_ARB,GL_TRUE,
  241. WGL_SAMPLE_BUFFERS_ARB,GL_TRUE,
  242. WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB,
  243. WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
  244. WGL_SAMPLES_ARB, 4, // Check For 4x Multisampling
  245. 0,0 };
  246.  
  247. int pixelFormat;
  248. UINT numFormats;
  249.  
  250. bool status = wglChoosePixelFormatARB(game_dc, iAttributes, fAttributes, 1, &pixelFormat, &numFormats);
  251.  
  252. if (status == false || numFormats == 0) {
  253. MessageBox(NULL, "wglChoosePixelFormatARB() failed", "Cannot create a suitable OpenGL Window. Reason: wglChoosePixelFormatARB", MB_OK);
  254. exit(1);
  255. }
  256.  
  257. PIXELFORMATDESCRIPTOR PFD;
  258. DescribePixelFormat(game_dc, pixelFormat, sizeof(PFD), &PFD);
  259. SetPixelFormat(game_dc, pixelFormat, &PFD);
  260.  
  261. gl.GLRequired = (double) gl_major_min + (double) gl_minor_min / 10.0;
  262. int contextAttribs[] = {
  263. WGL_CONTEXT_MAJOR_VERSION_ARB, gl_major_min,
  264. WGL_CONTEXT_MINOR_VERSION_ARB, gl_minor_min,
  265. WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
  266. 0
  267. };
  268.  
  269. game_rc = wglCreateContextAttribsARB(game_dc, 0, contextAttribs);
  270. if (game_rc == NULL) {
  271. MessageBox(game_window, "wglCreateContextAttribsARB() failed", "Cannot create a suitable OpenGL Window. Reason: wglChoosePixelFormatARB", MB_OK);
  272. exit(1);
  273. }
  274.  
  275. upload_rc = wglCreateContextAttribsARB(game_dc, game_rc, contextAttribs);
  276. if (upload_rc == NULL) // create the rendering context
  277. {
  278. MessageBox(game_window, "Multiple OpenGL contexts could not be initialized -- CreateContext Error ; report this to program authors for help!", "OpenGL Error", MB_OK);
  279. exit(1);
  280. }
  281.  
  282. .
  283. .
  284. .
  285.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:2: error: ‘HWND’ does not name a type
  HWND game_window;           // global game window handle
  ^~~~
prog.cpp:2:2: error: ‘HINSTANCE’ does not name a type
  HINSTANCE game_instance;    // global game instance handle
  ^~~~~~~~~
prog.cpp:3:2: error: ‘HDC’ does not name a type
  HDC game_dc;                // global device context (GDI) handle
  ^~~
prog.cpp:5:2: error: ‘DEVMODE’ does not name a type
  DEVMODE game_screen;               // global for full screen mode
  ^~~~~~~
prog.cpp:7:2: error: ‘HGLRC’ does not name a type
  HGLRC game_rc;              // global rendering context (OpenGL) handle
  ^~~~~
prog.cpp:8:2: error: ‘HGLRC’ does not name a type
  HGLRC upload_rc;            // global uploading context (OpenGL) handle
  ^~~~~
prog.cpp:10:2: error: ‘Zbool’ does not name a type
  Zbool draw_ok;                      // for whether OpenGL init ok
  ^~~~~
prog.cpp:11:2: error: ‘PIXELFORMATDESCRIPTOR’ does not name a type
  PIXELFORMATDESCRIPTOR pfd;
  ^~~~~~~~~~~~~~~~~~~~~
prog.cpp:13:2: error: ‘MSG’ does not name a type
  MSG msg;             // generic message
  ^~~
prog.cpp: In function ‘bool SetupOpenGLWindow()’:
prog.cpp:18:2: error: ‘PFNWGLCHOOSEPIXELFORMATARBPROC’ was not declared in this scope
  PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = nullptr;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:19:2: error: ‘PFNWGLCREATECONTEXTATTRIBSARBPROC’ was not declared in this scope
  PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = nullptr;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:22:3: error: ‘display’ was not declared in this scope
   display.hinstance = game_instance = hinstance;
   ^~~~~~~
prog.cpp:22:23: error: ‘game_instance’ was not declared in this scope
   display.hinstance = game_instance = hinstance;
                       ^~~~~~~~~~~~~
prog.cpp:22:39: error: ‘hinstance’ was not declared in this scope
   display.hinstance = game_instance = hinstance;
                                       ^~~~~~~~~
prog.cpp:26:4: error: ‘WNDCLASSEX’ was not declared in this scope
    WNDCLASSEX winclass; // this will hold the class we create
    ^~~~~~~~~~
prog.cpp:27:4: error: ‘winclass’ was not declared in this scope
    winclass.cbSize = sizeof(WNDCLASSEX);
    ^~~~~~~~
prog.cpp:28:21: error: ‘CS_DBLCLKS’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                     ^~~~~~~~~~
prog.cpp:28:34: error: ‘CS_OWNDC’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                                  ^~~~~~~~
prog.cpp:28:45: error: ‘CS_HREDRAW’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                                             ^~~~~~~~~~
prog.cpp:28:58: error: ‘CS_VREDRAW’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                                                          ^~~~~~~~~~
prog.cpp:29:27: error: ‘FakeWinProc’ was not declared in this scope
    winclass.lpfnWndProc = FakeWinProc;
                           ^~~~~~~~~~~
prog.cpp:33:30: error: ‘NULL’ was not declared in this scope
    winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                              ^~~~
prog.cpp:33:36: error: ‘IDI_APPLICATION’ was not declared in this scope
    winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                                    ^~~~~~~~~~~~~~~
prog.cpp:33:51: error: ‘LoadIcon’ was not declared in this scope
    winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                                                   ^
prog.cpp:35:40: error: ‘IDC_ARROW’ was not declared in this scope
    winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
                                        ^~~~~~~~~
prog.cpp:35:49: error: ‘LoadCursor’ was not declared in this scope
    winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
                                                 ^
prog.cpp:36:30: error: ‘HBRUSH’ was not declared in this scope
    winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
                              ^~~~~~
prog.cpp:41:34: error: ‘RegisterClassEx’ was not declared in this scope
    if (!RegisterClassEx(&winclass)) {
                                  ^
prog.cpp:42:132: error: ‘MB_OK’ was not declared in this scope
     MessageBox(NULL, "RegisterClassEx() failed", "Could not create a suitable OpenGL window. Reason: RegisterClassEx(FakeWindow)", MB_OK);
                                                                                                                                    ^~~~~
prog.cpp:42:137: error: ‘MessageBox’ was not declared in this scope
     MessageBox(NULL, "RegisterClassEx() failed", "Could not create a suitable OpenGL window. Reason: RegisterClassEx(FakeWindow)", MB_OK);
                                                                                                                                         ^
prog.cpp:43:11: error: ‘exit’ was not declared in this scope
     exit(1);
           ^
prog.cpp:47:3: error: ‘HWND’ was not declared in this scope
   HWND fakeWND = CreateWindow(
   ^~~~
prog.cpp:56:3: error: ‘HDC’ was not declared in this scope
   HDC fakeDC = GetDC(fakeWND);        // Device Context
   ^~~
prog.cpp:69:3: error: ‘PIXELFORMATDESCRIPTOR’ was not declared in this scope
   PIXELFORMATDESCRIPTOR fakePFD =
   ^~~~~~~~~~~~~~~~~~~~~
prog.cpp:89:37: error: ‘fakeDC’ was not declared in this scope
   int fakePFDID = ChoosePixelFormat(fakeDC, &fakePFD);
                                     ^~~~~~
prog.cpp:89:46: error: ‘fakePFD’ was not declared in this scope
   int fakePFDID = ChoosePixelFormat(fakeDC, &fakePFD);
                                              ^~~~~~~
prog.cpp:89:53: error: ‘ChoosePixelFormat’ was not declared in this scope
   int fakePFDID = ChoosePixelFormat(fakeDC, &fakePFD);
                                                     ^
prog.cpp:91:15: error: ‘NULL’ was not declared in this scope
    MessageBox(NULL, "ChoosePixelFormat() failed", "Could not create a suitable OpenGL window. Reason: ChoosePixelFormat", MB_OK);
               ^~~~
prog.cpp:91:123: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "ChoosePixelFormat() failed", "Could not create a suitable OpenGL window. Reason: ChoosePixelFormat", MB_OK);
                                                                                                                           ^~~~~
prog.cpp:91:128: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "ChoosePixelFormat() failed", "Could not create a suitable OpenGL window. Reason: ChoosePixelFormat", MB_OK);
                                                                                                                                ^
prog.cpp:92:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:95:49: error: ‘SetPixelFormat’ was not declared in this scope
   if (SetPixelFormat(fakeDC, fakePFDID, &fakePFD) == false) {
                                                 ^
prog.cpp:96:15: error: ‘NULL’ was not declared in this scope
    MessageBox(NULL, "SetPixelFormat() failed", "Cannot create a suitable OpenGL Window. Reason: SetPixelFormat", MB_OK);
               ^~~~
prog.cpp:96:114: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "SetPixelFormat() failed", "Cannot create a suitable OpenGL Window. Reason: SetPixelFormat", MB_OK);
                                                                                                                  ^~~~~
prog.cpp:96:119: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "SetPixelFormat() failed", "Cannot create a suitable OpenGL Window. Reason: SetPixelFormat", MB_OK);
                                                                                                                       ^
prog.cpp:97:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:100:3: error: ‘HGLRC’ was not declared in this scope
   HGLRC fakeRC = wglCreateContext(fakeDC);    // Rendering Context
   ^~~~~
prog.cpp:102:9: error: ‘fakeRC’ was not declared in this scope
   if ( !fakeRC ) OUTPUT("Could not create fake Rendering Context!\n");
         ^~~~~~
prog.cpp:102:69: error: ‘OUTPUT’ was not declared in this scope
   if ( !fakeRC ) OUTPUT("Could not create fake Rendering Context!\n");
                                                                     ^
prog.cpp:104:30: error: ‘fakeRC’ was not declared in this scope
   if (wglMakeCurrent(fakeDC, fakeRC) == false) {
                              ^~~~~~
prog.cpp:104:36: error: ‘wglMakeCurrent’ was not declared in this scope
   if (wglMakeCurrent(fakeDC, fakeRC) == false) {
                                    ^
prog.cpp:105:15: error: ‘NULL’ was not declared in this scope
    MessageBox(NULL, "wglMakeCurrent(wglMakeCurrent) failed", "Cannot create a suitable OpenGL Window. Reason: wglMakeCurrent", MB_OK);
               ^~~~
prog.cpp:105:128: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "wglMakeCurrent(wglMakeCurrent) failed", "Cannot create a suitable OpenGL Window. Reason: wglMakeCurrent", MB_OK);
                                                                                                                                ^~~~~
prog.cpp:105:133: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "wglMakeCurrent(wglMakeCurrent) failed", "Cannot create a suitable OpenGL Window. Reason: wglMakeCurrent", MB_OK);
                                                                                                                                     ^
prog.cpp:106:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:109:21: error: ‘glGetString’ was not declared in this scope
   if ( !glGetString() ) { // fails here, added in during testing (gl.getInfo returns false when )
                     ^
prog.cpp:110:15: error: ‘NULL’ was not declared in this scope
    MessageBox(NULL, "glGetInfo returned false", "Cannot create a suitable OpenGL Window.  Reason: wglCreateContext", MB_OK);
               ^~~~
prog.cpp:110:118: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "glGetInfo returned false", "Cannot create a suitable OpenGL Window.  Reason: wglCreateContext", MB_OK);
                                                                                                                      ^~~~~
prog.cpp:110:123: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "glGetInfo returned false", "Cannot create a suitable OpenGL Window.  Reason: wglCreateContext", MB_OK);
                                                                                                                           ^
prog.cpp:111:15: error: ‘glGetError’ was not declared in this scope
    glGetError();
               ^
prog.cpp:112:52: error: ‘FMT’ was not declared in this scope
    MessageBox(NULL, FMT("GLError = %d",glGetError()).c_str(), FMT("GLError = %d",glGetError()).c_str(), MB_OK );
                                                    ^
prog.cpp:115:3: error: ‘wglCreateContextAttribsARB’ was not declared in this scope
   wglCreateContextAttribsARB = reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>(wglGetProcAddress("wglCreateContextAttribsARB"));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:115:49: error: ‘PFNWGLCREATECONTEXTATTRIBSARBPROC’ does not name a type
   wglCreateContextAttribsARB = reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>(wglGetProcAddress("wglCreateContextAttribsARB"));
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:115:130: error: ‘wglGetProcAddress’ was not declared in this scope
   wglCreateContextAttribsARB = reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>(wglGetProcAddress("wglCreateContextAttribsARB"));
                                                                                                                                  ^
prog.cpp:118:15: error: ‘NULL’ was not declared in this scope
    MessageBox(NULL, "wglGetProcAddress(wglCreateContextAttribsARB) failed", "Cannot create a suitable OpenGL Window.  Reason: wglCreateContextAttribsARB", MB_OK);
               ^~~~
prog.cpp:118:156: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "wglGetProcAddress(wglCreateContextAttribsARB) failed", "Cannot create a suitable OpenGL Window.  Reason: wglCreateContextAttribsARB", MB_OK);
                                                                                                                                                            ^~~~~
prog.cpp:118:161: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "wglGetProcAddress(wglCreateContextAttribsARB) failed", "Cannot create a suitable OpenGL Window.  Reason: wglCreateContextAttribsARB", MB_OK);
                                                                                                                                                                 ^
prog.cpp:119:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:122:3: error: ‘wglChoosePixelFormatARB’ was not declared in this scope
   wglChoosePixelFormatARB = reinterpret_cast<PFNWGLCHOOSEPIXELFORMATARBPROC>(wglGetProcAddress("wglChoosePixelFormatARB"));
   ^~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:122:46: error: ‘PFNWGLCHOOSEPIXELFORMATARBPROC’ does not name a type
   wglChoosePixelFormatARB = reinterpret_cast<PFNWGLCHOOSEPIXELFORMATARBPROC>(wglGetProcAddress("wglChoosePixelFormatARB"));
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:124:15: error: ‘NULL’ was not declared in this scope
    MessageBox(NULL, "wglGetProcAddress(wglChoosePixelFormatARB) failed", "Cannot create a suitable OpenGL Window.  Reason: wglChoosePixelFormatARB", MB_OK);
               ^~~~
prog.cpp:124:150: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "wglGetProcAddress(wglChoosePixelFormatARB) failed", "Cannot create a suitable OpenGL Window.  Reason: wglChoosePixelFormatARB", MB_OK);
                                                                                                                                                      ^~~~~
prog.cpp:124:155: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "wglGetProcAddress(wglChoosePixelFormatARB) failed", "Cannot create a suitable OpenGL Window.  Reason: wglChoosePixelFormatARB", MB_OK);
                                                                                                                                                           ^
prog.cpp:125:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:128:7: error: ‘fakeRC’ was not declared in this scope
   if (fakeRC == 0) {
       ^~~~~~
prog.cpp:129:15: error: ‘NULL’ was not declared in this scope
    MessageBox(NULL, "wglCreateContext(wglCreateContext) failed", "Cannot create a suitable OpenGL Window. Reason: wglCreateContext", MB_OK);
               ^~~~
prog.cpp:129:134: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "wglCreateContext(wglCreateContext) failed", "Cannot create a suitable OpenGL Window. Reason: wglCreateContext", MB_OK);
                                                                                                                                      ^~~~~
prog.cpp:129:139: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "wglCreateContext(wglCreateContext) failed", "Cannot create a suitable OpenGL Window. Reason: wglCreateContext", MB_OK);
                                                                                                                                           ^
prog.cpp:130:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:133:49: error: ‘OUTPUT’ was not declared in this scope
   OUTPUT("SetupOpenGLWindow() fakeRC created!\n");
                                                 ^
prog.cpp:138:31: error: ‘SM_CXSCREEN’ was not declared in this scope
   int xPos = GetSystemMetrics(SM_CXSCREEN) - display.w;
                               ^~~~~~~~~~~
prog.cpp:138:42: error: ‘GetSystemMetrics’ was not declared in this scope
   int xPos = GetSystemMetrics(SM_CXSCREEN) - display.w;
                                          ^
prog.cpp:139:31: error: ‘SM_CYSCREEN’ was not declared in this scope
   int yPos = GetSystemMetrics(SM_CYSCREEN) - display.h;
                               ^~~~~~~~~~~
prog.cpp:141:25: error: ‘CmdLine’ was not declared in this scope
   bool opt_borderless = CmdLine.Option("-borderless");
                         ^~~~~~~
prog.cpp:145:3: error: ‘DWORD’ was not declared in this scope
   DWORD winExStyle =
   ^~~~~
prog.cpp:151:9: error: expected ‘;’ before ‘winStyle’
   DWORD winStyle =
         ^~~~~~~~
prog.cpp:160:4: error: ‘WNDCLASSEX’ was not declared in this scope
    WNDCLASSEX winclass; // this will hold the class we create
    ^~~~~~~~~~
prog.cpp:161:4: error: ‘winclass’ was not declared in this scope
    winclass.cbSize = sizeof(WNDCLASSEX);
    ^~~~~~~~
prog.cpp:162:21: error: ‘CS_DBLCLKS’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                     ^~~~~~~~~~
prog.cpp:162:34: error: ‘CS_OWNDC’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                                  ^~~~~~~~
prog.cpp:162:45: error: ‘CS_HREDRAW’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                                             ^~~~~~~~~~
prog.cpp:162:58: error: ‘CS_VREDRAW’ was not declared in this scope
    winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
                                                          ^~~~~~~~~~
prog.cpp:163:27: error: ‘WinProc’ was not declared in this scope
    winclass.lpfnWndProc = WinProc;
                           ^~~~~~~
prog.cpp:167:30: error: ‘NULL’ was not declared in this scope
    winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                              ^~~~
prog.cpp:167:36: error: ‘IDI_APPLICATION’ was not declared in this scope
    winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                                    ^~~~~~~~~~~~~~~
prog.cpp:167:51: error: ‘LoadIcon’ was not declared in this scope
    winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                                                   ^
prog.cpp:169:40: error: ‘IDC_ARROW’ was not declared in this scope
    winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
                                        ^~~~~~~~~
prog.cpp:169:49: error: ‘LoadCursor’ was not declared in this scope
    winclass.hCursor = LoadCursor(NULL, IDC_ARROW);
                                                 ^
prog.cpp:170:30: error: ‘HBRUSH’ was not declared in this scope
    winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
                              ^~~~~~
prog.cpp:175:34: error: ‘RegisterClassEx’ was not declared in this scope
    if (!RegisterClassEx(&winclass)) {
                                  ^
prog.cpp:176:142: error: ‘MB_OK’ was not declared in this scope
     MessageBox(NULL, "RegisterClassEx(RealWindow) failed", "Could not create a suitable OpenGL window. Reason: RegisterClassEx(RealWindow)", MB_OK);
                                                                                                                                              ^~~~~
prog.cpp:176:147: error: ‘MessageBox’ was not declared in this scope
     MessageBox(NULL, "RegisterClassEx(RealWindow) failed", "Could not create a suitable OpenGL window. Reason: RegisterClassEx(RealWindow)", MB_OK);
                                                                                                                                                   ^
prog.cpp:177:11: error: ‘exit’ was not declared in this scope
     exit(1);
           ^
prog.cpp:182:3: error: ‘game_window’ was not declared in this scope
   game_window = CreateWindowEx(
   ^~~~~~~~~~~
prog.cpp:183:4: error: ‘winExStyle’ was not declared in this scope
    winExStyle,          // extended style
    ^~~~~~~~~~
prog.cpp:185:4: error: ‘gl’ was not declared in this scope
    gl.winTitle.c_str(),          // title
    ^~
prog.cpp:186:4: error: ‘winStyle’ was not declared in this scope
    winStyle,
    ^~~~~~~~
prog.cpp:191:4: error: ‘HWND_DESKTOP’ was not declared in this scope
    HWND_DESKTOP,      // handle to parent
    ^~~~~~~~~~~~
prog.cpp:192:4: error: ‘NULL’ was not declared in this scope
    NULL,              // handle to menu
    ^~~~
prog.cpp:195:3: error: ‘CreateWindowEx’ was not declared in this scope
   );
   ^
prog.cpp:197:38: error: ‘getLastErrorText’ was not declared in this scope
    MessageBox(NULL, getLastErrorText().c_str(), "CreateWindowEx Error Text", MB_OK);
                                      ^
prog.cpp:197:78: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, getLastErrorText().c_str(), "CreateWindowEx Error Text", MB_OK);
                                                                              ^~~~~
prog.cpp:197:83: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, getLastErrorText().c_str(), "CreateWindowEx Error Text", MB_OK);
                                                                                   ^
prog.cpp:199:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:205:28: error: ‘wglMakeCurrent’ was not declared in this scope
   wglMakeCurrent(NULL, NULL);
                            ^
prog.cpp:206:20: error: ‘fakeRC’ was not declared in this scope
   wglDeleteContext(fakeRC);
                    ^~~~~~
prog.cpp:206:26: error: ‘wglDeleteContext’ was not declared in this scope
   wglDeleteContext(fakeRC);
                          ^
prog.cpp:207:13: error: ‘fakeWND’ was not declared in this scope
   ReleaseDC(fakeWND, fakeDC);
             ^~~~~~~
prog.cpp:207:28: error: ‘ReleaseDC’ was not declared in this scope
   ReleaseDC(fakeWND, fakeDC);
                            ^
prog.cpp:209:24: error: ‘DestroyWindow’ was not declared in this scope
   DestroyWindow(fakeWND);
                        ^
prog.cpp:215:4: error: ‘LONG’ was not declared in this scope
    LONG lStyle = GetWindowLong(game_window, GWL_STYLE);
    ^~~~
prog.cpp:216:4: error: ‘lStyle’ was not declared in this scope
    lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
    ^~~~~~
prog.cpp:216:16: error: ‘WS_CAPTION’ was not declared in this scope
    lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
                ^~~~~~~~~~
prog.cpp:216:29: error: ‘WS_THICKFRAME’ was not declared in this scope
    lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
                             ^~~~~~~~~~~~~
prog.cpp:216:45: error: ‘WS_MINIMIZE’ was not declared in this scope
    lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
                                             ^~~~~~~~~~~
prog.cpp:216:59: error: ‘WS_MAXIMIZE’ was not declared in this scope
    lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
                                                           ^~~~~~~~~~~
prog.cpp:216:73: error: ‘WS_SYSMENU’ was not declared in this scope
    lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
                                                                         ^~~~~~~~~~
prog.cpp:217:31: error: ‘GWL_STYLE’ was not declared in this scope
    SetWindowLong(game_window, GWL_STYLE, lStyle);
                               ^~~~~~~~~
prog.cpp:217:48: error: ‘SetWindowLong’ was not declared in this scope
    SetWindowLong(game_window, GWL_STYLE, lStyle);
                                                ^
prog.cpp:218:9: error: expected ‘;’ before ‘lExStyle’
    LONG lExStyle = GetWindowLong(game_window, GWL_EXSTYLE);
         ^~~~~~~~
prog.cpp:219:4: error: ‘lExStyle’ was not declared in this scope
    lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
    ^~~~~~~~
prog.cpp:219:18: error: ‘WS_EX_DLGMODALFRAME’ was not declared in this scope
    lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
                  ^~~~~~~~~~~~~~~~~~~
prog.cpp:219:40: error: ‘WS_EX_CLIENTEDGE’ was not declared in this scope
    lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
                                        ^~~~~~~~~~~~~~~~
prog.cpp:219:59: error: ‘WS_EX_STATICEDGE’ was not declared in this scope
    lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
                                                           ^~~~~~~~~~~~~~~~
prog.cpp:220:31: error: ‘GWL_EXSTYLE’ was not declared in this scope
    SetWindowLong(game_window, GWL_EXSTYLE, lExStyle);
                               ^~~~~~~~~~~
prog.cpp:221:64: error: ‘SWP_FRAMECHANGED’ was not declared in this scope
    SetWindowPos(game_window, NULL, 0, 0, display.w, display.h, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
                                                                ^~~~~~~~~~~~~~~~
prog.cpp:221:83: error: ‘SWP_NOMOVE’ was not declared in this scope
    SetWindowPos(game_window, NULL, 0, 0, display.w, display.h, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
                                                                                   ^~~~~~~~~~
prog.cpp:221:96: error: ‘SWP_NOSIZE’ was not declared in this scope
    SetWindowPos(game_window, NULL, 0, 0, display.w, display.h, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
                                                                                                ^~~~~~~~~~
prog.cpp:221:109: error: ‘SWP_NOZORDER’ was not declared in this scope
    SetWindowPos(game_window, NULL, 0, 0, display.w, display.h, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
                                                                                                             ^~~~~~~~~~~~
prog.cpp:221:124: error: ‘SWP_NOOWNERZORDER’ was not declared in this scope
    SetWindowPos(game_window, NULL, 0, 0, display.w, display.h, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
                                                                                                                            ^~~~~~~~~~~~~~~~~
prog.cpp:221:141: error: ‘SetWindowPos’ was not declared in this scope
    SetWindowPos(game_window, NULL, 0, 0, display.w, display.h, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
                                                                                                                                             ^
prog.cpp:225:3: error: ‘RECT’ was not declared in this scope
   RECT windowRect = { 0, 0, display.w, display.h }; // Define Our Window Coordinates
   ^~~~
prog.cpp:226:23: error: ‘windowRect’ was not declared in this scope
   AdjustWindowRectEx(&windowRect, WS_POPUP, 0, winStyle);
                       ^~~~~~~~~~
prog.cpp:226:35: error: ‘WS_POPUP’ was not declared in this scope
   AdjustWindowRectEx(&windowRect, WS_POPUP, 0, winStyle);
                                   ^~~~~~~~
prog.cpp:226:56: error: ‘AdjustWindowRectEx’ was not declared in this scope
   AdjustWindowRectEx(&windowRect, WS_POPUP, 0, winStyle);
                                                        ^
prog.cpp:228:3: error: ‘game_dc’ was not declared in this scope
   game_dc = GetDC(game_window);
   ^~~~~~~
prog.cpp:228:30: error: ‘GetDC’ was not declared in this scope
   game_dc = GetDC(game_window);
                              ^
prog.cpp:232:3: error: ‘WGL_DRAW_TO_WINDOW_ARB’ was not declared in this scope
   WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
   ^~~~~~~~~~~~~~~~~~~~~~
prog.cpp:232:26: error: ‘GL_TRUE’ was not declared in this scope
   WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
                          ^~~~~~~
prog.cpp:233:3: error: ‘WGL_SUPPORT_OPENGL_ARB’ was not declared in this scope
   WGL_SUPPORT_OPENGL_ARB,GL_TRUE,
   ^~~~~~~~~~~~~~~~~~~~~~
prog.cpp:234:3: error: ‘WGL_ACCELERATION_ARB’ was not declared in this scope
   WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
   ^~~~~~~~~~~~~~~~~~~~
prog.cpp:234:25: error: ‘WGL_FULL_ACCELERATION_ARB’ was not declared in this scope
   WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:235:3: error: ‘WGL_COLOR_BITS_ARB’ was not declared in this scope
   WGL_COLOR_BITS_ARB,24,
   ^~~~~~~~~~~~~~~~~~
prog.cpp:236:3: error: ‘WGL_ALPHA_BITS_ARB’ was not declared in this scope
   WGL_ALPHA_BITS_ARB,8,
   ^~~~~~~~~~~~~~~~~~
prog.cpp:237:3: error: ‘WGL_DEPTH_BITS_ARB’ was not declared in this scope
   WGL_DEPTH_BITS_ARB,24,
   ^~~~~~~~~~~~~~~~~~
prog.cpp:238:3: error: ‘WGL_STENCIL_BITS_ARB’ was not declared in this scope
   WGL_STENCIL_BITS_ARB,8,
   ^~~~~~~~~~~~~~~~~~~~
prog.cpp:239:3: error: ‘WGL_DOUBLE_BUFFER_ARB’ was not declared in this scope
   WGL_DOUBLE_BUFFER_ARB,GL_TRUE,
   ^~~~~~~~~~~~~~~~~~~~~
prog.cpp:240:3: error: ‘WGL_SAMPLE_BUFFERS_ARB’ was not declared in this scope
   WGL_SAMPLE_BUFFERS_ARB,GL_TRUE,
   ^~~~~~~~~~~~~~~~~~~~~~
prog.cpp:241:3: error: ‘WGL_SWAP_METHOD_ARB’ was not declared in this scope
   WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB,
   ^~~~~~~~~~~~~~~~~~~
prog.cpp:241:24: error: ‘WGL_SWAP_EXCHANGE_ARB’ was not declared in this scope
   WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB,
                        ^~~~~~~~~~~~~~~~~~~~~
prog.cpp:242:3: error: ‘WGL_PIXEL_TYPE_ARB’ was not declared in this scope
   WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
   ^~~~~~~~~~~~~~~~~~
prog.cpp:242:23: error: ‘WGL_TYPE_RGBA_ARB’ was not declared in this scope
   WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
                       ^~~~~~~~~~~~~~~~~
prog.cpp:243:3: error: ‘WGL_SAMPLES_ARB’ was not declared in this scope
   WGL_SAMPLES_ARB, 4,      // Check For 4x Multisampling
   ^~~~~~~~~~~~~~~
prog.cpp:247:3: error: ‘UINT’ was not declared in this scope
   UINT numFormats;
   ^~~~
prog.cpp:249:94: error: ‘numFormats’ was not declared in this scope
   bool status = wglChoosePixelFormatARB(game_dc, iAttributes, fAttributes, 1, &pixelFormat, &numFormats);
                                                                                              ^~~~~~~~~~
prog.cpp:252:133: error: ‘MB_OK’ was not declared in this scope
    MessageBox(NULL, "wglChoosePixelFormatARB() failed", "Cannot create a suitable OpenGL Window.  Reason: wglChoosePixelFormatARB", MB_OK);
                                                                                                                                     ^~~~~
prog.cpp:252:138: error: ‘MessageBox’ was not declared in this scope
    MessageBox(NULL, "wglChoosePixelFormatARB() failed", "Cannot create a suitable OpenGL Window.  Reason: wglChoosePixelFormatARB", MB_OK);
                                                                                                                                          ^
prog.cpp:253:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:256:25: error: expected ‘;’ before ‘PFD’
   PIXELFORMATDESCRIPTOR PFD;
                         ^~~
prog.cpp:257:52: error: ‘PFD’ was not declared in this scope
   DescribePixelFormat(game_dc, pixelFormat, sizeof(PFD), &PFD);
                                                    ^~~
prog.cpp:257:62: error: ‘DescribePixelFormat’ was not declared in this scope
   DescribePixelFormat(game_dc, pixelFormat, sizeof(PFD), &PFD);
                                                              ^
prog.cpp:258:44: error: ‘SetPixelFormat’ was not declared in this scope
   SetPixelFormat(game_dc, pixelFormat, &PFD);
                                            ^
prog.cpp:260:28: error: ‘gl_major_min’ was not declared in this scope
   gl.GLRequired = (double) gl_major_min + (double) gl_minor_min / 10.0;
                            ^~~~~~~~~~~~
prog.cpp:260:52: error: ‘gl_minor_min’ was not declared in this scope
   gl.GLRequired = (double) gl_major_min + (double) gl_minor_min / 10.0;
                                                    ^~~~~~~~~~~~
prog.cpp:262:4: error: ‘WGL_CONTEXT_MAJOR_VERSION_ARB’ was not declared in this scope
    WGL_CONTEXT_MAJOR_VERSION_ARB, gl_major_min,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:263:4: error: ‘WGL_CONTEXT_MINOR_VERSION_ARB’ was not declared in this scope
    WGL_CONTEXT_MINOR_VERSION_ARB, gl_minor_min,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:264:4: error: ‘WGL_CONTEXT_PROFILE_MASK_ARB’ was not declared in this scope
    WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:264:34: error: ‘WGL_CONTEXT_CORE_PROFILE_BIT_ARB’ was not declared in this scope
    WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:268:3: error: ‘game_rc’ was not declared in this scope
   game_rc = wglCreateContextAttribsARB(game_dc, 0, contextAttribs);
   ^~~~~~~
prog.cpp:270:143: error: ‘MB_OK’ was not declared in this scope
    MessageBox(game_window, "wglCreateContextAttribsARB() failed", "Cannot create a suitable OpenGL Window.  Reason: wglChoosePixelFormatARB", MB_OK);
                                                                                                                                               ^~~~~
prog.cpp:270:148: error: ‘MessageBox’ was not declared in this scope
    MessageBox(game_window, "wglCreateContextAttribsARB() failed", "Cannot create a suitable OpenGL Window.  Reason: wglChoosePixelFormatARB", MB_OK);
                                                                                                                                                    ^
prog.cpp:271:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:274:3: error: ‘upload_rc’ was not declared in this scope
   upload_rc = wglCreateContextAttribsARB(game_dc, game_rc, contextAttribs);
   ^~~~~~~~~
prog.cpp:277:163: error: ‘MB_OK’ was not declared in this scope
    MessageBox(game_window, "Multiple OpenGL contexts could not be initialized -- CreateContext Error ; report this to program authors for help!", "OpenGL Error", MB_OK);
                                                                                                                                                                   ^~~~~
prog.cpp:277:168: error: ‘MessageBox’ was not declared in this scope
    MessageBox(game_window, "Multiple OpenGL contexts could not be initialized -- CreateContext Error ; report this to program authors for help!", "OpenGL Error", MB_OK);
                                                                                                                                                                        ^
prog.cpp:278:10: error: ‘exit’ was not declared in this scope
    exit(1);
          ^
prog.cpp:281:1: error: expected primary-expression before ‘.’ token
 .
 ^
prog.cpp:282:1: error: expected unqualified-id before ‘.’ token
 .
 ^
prog.cpp:283:1: error: expected unqualified-id before ‘.’ token
 .
 ^
prog.cpp:283:1: error: expected unqualified-id at end of input
prog.cpp:283:1: error: expected ‘}’ at end of input
stdout
Standard output is empty