c:\dev-cpp\beginogl.cpp(6) : error C2143: syntax error : missing ';' before 'PCH creation point'
c:\dev-cpp\beginogl.cpp(66) : error C2360: initialization of 'pfd' is skipped by 'case' label
c:\dev-cpp\beginogl.cpp(40) : see declaration of 'pfd'
c:\dev-cpp\beginogl.cpp(67) : error C2360: initialization of 'pfd' is skipped by 'case' label
c:\dev-cpp\beginogl.cpp(40) : see declaration of 'pfd'
c:\dev-cpp\beginogl.cpp(68) : error C2360: initialization of 'pfd' is skipped by 'case' label
c:\dev-cpp\beginogl.cpp(40) : see declaration of 'pfd'
c:\dev-cpp\beginogl.cpp(74) : error C2360: initialization of 'pfd' is skipped by 'case' label
c:\dev-cpp\beginogl.cpp(40) : see declaration of 'pfd'
c:\dev-cpp\beginogl.cpp(80) : error C2360: initialization of 'pfd' is skipped by 'case' label
c:\dev-cpp\beginogl.cpp(40) : see declaration of 'pfd'
CGfxOpenGL.cpp
c:\dev-cpp\cgfxopengl.cpp(10) : error C2143: syntax error : missing ';' before 'PCH creation point'
//First error
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include "CGfxOpenGL.h"
HGLRC hRC; //<--Error is on this line
HDC hDC;
CGfxOpenGL *g_glRender;
//Second error (from CGfxOpenGL.cpp)
#ifdef _WINDOWS
#include <windows.h>
#endif
#include <gl/gl.h>
#include <gl/glu.h>
#include <math.h>
#include "CGfxOpenGL.h"
CGfxOpenGL::CGfxOpenGL() //<--Error is on this line
{
}
switch(msg)
{
case WM_CREATE:
hDC = GetDC(hWnd);
int pixelFormat;
PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_SUPPORT_OPENGL |
PFD_DRAW_TO_WINDOW |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
32,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
16,
0,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0};
pixelFormat = ChoosePixelFormat(hDC, &pfd);
SetPixelFormat(hDC, pixelFormat, &pfd);
hRC = wglCreateContext(hDC);
wglMakeCurrent(hDC, hRC);
break;
case WM_DESTROY: //<--Error 2
case WM_QUIT: //<--Error 3
case WM_CLOSE: //<--Error 4
wglMakeCurrent(hDC, NULL);
wglDeleteContext(hRC);
PostQuitMessage(0);
return 0;
break;
case WM_SIZE: //<--Error 5
height = HIWORD(lParam);
width = LOWORD(lParam);
g_glRender->SetupProjection(width, height);
break;
case WM_KEYUP: //<--Error 6
switch (wParam)
{
case VK_ESCAPE:
//User has pressed the escape key, so quit
DestroyWindow(hWnd);
return 0;
break;
}
break;
}