SetPixelFormat does not accept 3 parameters, whoah?
I am in the process of trying to structure my tiling engine in such a way as there is a base class which holds all of my window and opengl initiation functions and variables. Well, it was all going ok structurely wise(no compile errors, but i messed up on initiation so that a window doesnt appear) until i was getting to my pixelformat function, which for now, is pretty much a direct copy of GameTutorials one:
well, here is the compiler build error:
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.dwLayerMask = PFD_MAIN_PLANE;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = screen_depth;
pfd.cDepthBits = screen_depth;
pfd.cAccumBits = 0;
pfd.cStencilBits = 0;
if ( (pixelformat = ChoosePixelFormat(g_hdc, &pfd)) == FALSE )
MessageBox(NULL, "ChoosePixelFormat failed", "Error", MB_OK);
if (SetPixelFormat(g_hdc, pixelformat, &pfd) == FALSE)
MessageBox(NULL, "SetPixelFormat failed", "Error", MB_OK);
Now that is funny, as since i pretty much did a copy paste from one of my other programs, which worked, one would expect this to work. I have checked my dependencies, and I have included all GL related libraries except for GLUT, as well as included the proper header files. What could be going on? if it helps, my compiler is Visual C++ 5.0 prof. edition.
C:\Program Files\DevStudio\MyProjects\OpenGL Base\GLApp.cpp
(80) : error C2660: 'SetPixelFormat' : function does not take 3
EDIT:: Sorry for the ugly code, i tryed formatting it as it was filling up two screens worth for me but didnt get it all the way right.