I have a function that handles all the code for creating a cube.
I want it so when i click a dialog box button, it calls the fuction for creating a cube. I have done this but i don't see the cube!?....i think somthing is happening tho, because when i press the button, my grid changes color (for some reason it does this when there is textured geometry present as well as the grid)...so does this mean that its working, but just not displaying?
any help will be very much appreciated!!Code:BOOL CALLBACK InsertBrushDlgProc(HWND hWnd, UINT Message, WPARAM wparam, LPARAM lparam)
{
switch(Message)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
switch(LOWORD(wparam))
{
case IDSCUBE:
glPushMatrix();
SolidCube(1.0, 1.0, 1.0, 0.0, 0.0, 0.0,
FALSE,
0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0,
0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0,
0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0);
SwapBuffers( hDC );
EndDialog(hWnd, IDCANCEL);
break;
case IDCANCEL:
EndDialog(hWnd, IDCANCEL);
break;
}
break;
default:
return FALSE;
}
return TRUE;
}
-psychopath