if(upload_rc ==NULL)// create the rendering context
{
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: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