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:Code:bool GLApp::SetPixelFormat() { PIXELFORMATDESCRIPTOR pfd; int pixelformat; 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); return FALSE; } if (SetPixelFormat(g_hdc, pixelformat, &pfd) == FALSE) { MessageBox(NULL, "SetPixelFormat failed", "Error", MB_OK); return FALSE; } return TRUE; }
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.Code:C:\Program Files\DevStudio\MyProjects\OpenGL Base\GLApp.cpp (80) : error C2660: 'SetPixelFormat' : function does not take 3 parameters
thanks,
EvBladerunnervE
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.



LinkBack URL
About LinkBacks



. But when I say "BS", then you say "if you dont believe me then i am going to block you"(was there a message in between that? my home internet was running at 9600bps do to local telco maintenance, so i had horrible packet loss that night), what do you expect me to do? That is like Me saying I have invented a new form of space partitioning that is 1000% more efficient than BSP, you would of said the same thing.