Commit 2e333555 authored by LYMB Demo's avatar LYMB Demo
Browse files

pc clean ups

parent 5dbf7a5c
......@@ -183,6 +183,33 @@ void vtkWin32OglrRenderWindow::MakeCurrent()
}
}
void vtkWin32OglrRenderWindow::SetSize(int x, int y)
{
static int resizing = 0;
if ((this->Size[0] != x) || (this->Size[1] != y))
{
this->Modified();
this->Size[0] = x;
this->Size[1] = y;
if (this->Mapped)
{
if (!resizing)
{
resizing = 1;
SetWindowPos(this->WindowId,HWND_TOP,0,0,x,y,SWP_NOMOVE | SWP_NOZORDER);
resizing = 0;
//HDC adc;
//adc = GetDC(this->WindowId);
//SetWindowExtEx(adc,x,y,NULL);
//ReleaseDC(this->WindowId,adc);
}
}
}
}
static void vtkWin32OglrSwapBuffers(HDC hdc)
{
SwapBuffers(hdc);
......@@ -443,27 +470,6 @@ void vtkWin32OglrRenderWindow::WindowRemap()
this->WindowInitialize();
}
// Description:
// Specify the size of the rendering window.
void vtkWin32OglrRenderWindow::SetSize(int x,int y)
{
// if we arent mappen then just set the ivars
if (!this->Mapped)
{
if ((this->Size[0] != x)||(this->Size[1] != y))
{
this->Modified();
}
this->Size[0] = x;
this->Size[1] = y;
return;
}
// XResizeWindow(this->DisplayId,this->WindowId,x,y);
// XSync(this->DisplayId,False);
}
void vtkWin32OglrRenderWindow::PrintSelf(ostream& os, vtkIndent indent)
{
this->vtkRenderWindow::PrintSelf(os,indent);
......
......@@ -240,7 +240,14 @@ LRESULT CALLBACK vtkHandleMessage(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lPa
case WM_CHAR:
switch (wParam)
{
case 'e': exit(1); break;
case 'e':
{
// do a cleaner exit from windows
// first free up the windows resources
// me->RenderWindow->Delete();
PostQuitMessage(0);
}
break;
case 'u':
if (me->UserMethod) (*me->UserMethod)(me->UserMethodArg);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment