bitshifter420
June 23rd, 2007, 05:33 PM
Which is correct, ive seen it done both ways,
i would say the latter is proper, am i wrong?
In the window message procedure
WAY_1
case WM_PAINT:
BeginPaint(...);
RenderScene(...);
SwapBuffers(...);
EndPaint(...);
return 0;
WAY_2
case WM_PAINT:
BeginPaint(...);
EndPaint(...);
RenderScene(...);
SwapBuffers(...);
return 0;
ps: RenderScene() is a user defined function,
also im using HDC of my own, not (HDC)wParam
because of the custom pixel format and HGLRC in use.
i would say the latter is proper, am i wrong?
In the window message procedure
WAY_1
case WM_PAINT:
BeginPaint(...);
RenderScene(...);
SwapBuffers(...);
EndPaint(...);
return 0;
WAY_2
case WM_PAINT:
BeginPaint(...);
EndPaint(...);
RenderScene(...);
SwapBuffers(...);
return 0;
ps: RenderScene() is a user defined function,
also im using HDC of my own, not (HDC)wParam
because of the custom pixel format and HGLRC in use.