Original Post
I'm not sure its an OGL specific problem, so, its here instead of the OGL forum. I have a simple graphics engine being written (as of today, I have a scene graph with a mesh scene node and a transformation node working!!!) clicky, and here it is, with a rotating quad made from 2 triangles. Try re-sizing the window. Isn't the scene supposed to re-size so it'll fit in the available window? So, what is it that I've left out? Possibly something in the WndProc function? Is it WM_SIZE? Okay, if I'm right so far, is there a standard way of getting a pointer to something like one of these objects, without having a global? I hope this post made sense. It's fairly late.
/**
* Window message processing function called by windows.
*/
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message){
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hDC = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
}
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
class CEngine; // handles window creation
class COpenGLVideo; // inits the window for OGL