More Problems with OpenGL and the Client Area
I've tried several ways over the past couple of days to get opengl to draw to the client area without any problems.
I was able to get it to draw using WM_PAINT, but this caused some conflicts with my menus(and any other user input). I've looked around but can't seem to find the answer.
Here's a snipet of my code right now. I'm trying to make it so that the opengl rendering is cut off when messages are input(accessing menus, other input, etc.) You can assume that all the functions with the "s3d" prefix work properly on their own(and they do), but for some reason this code just gives me a blank screen that shows nothing that the opengl code should be showing.
Basically I'm trying to get opengl to render and then possibly leave the image there without continuous rendering, or to stop rendering when the program receives input.
bool bQuit = false;
if (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE))
bQuit = true;
s3dEnableOpenGL(hwnd, &hDC, &hRC);
s3dsetscreen(width , height);
s3dDisableOpenGL(hwnd, hDC, hRC);
Should I be doing this through the WM_PAINT command or another way? How?
I have a feeling I'm close, but I'm missing something crucial here.