[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.53,1.54 tc3DViewer.cpp,1.26,1.27 tcOOBView.cpp,1.4,1.5
Status: Alpha
Brought to you by:
ddcforge
From: <ddc...@us...> - 2004-01-18 18:42:45
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1:/tmp/cvs-serv28162/src/sim Modified Files: Game.cpp tc3DViewer.cpp tcOOBView.cpp Log Message: Changes to reduce block artifacts at screen transitions--planning to eliiminate Producer to fix gray background screen issue Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** Game.cpp 14 Jan 2004 01:13:22 -0000 1.53 --- Game.cpp 18 Jan 2004 18:42:41 -0000 1.54 *************** *** 86,90 **** */ tcGame::tcGame(const wxPoint& pos, const wxSize& size) : ! wxFrame((wxFrame *)NULL, -1, "Global Conflict", pos, size, 0*wxTRANSPARENT_WINDOW), // | wxNO_FULL_REPAINT_ON_RESIZE | wxCLIP_CHILDREN framePos(pos.x, pos.y), frameSize(size.GetWidth(), size.GetHeight()), mnWidth(size.GetWidth()), mnHeight(size.GetHeight()), --- 86,90 ---- */ tcGame::tcGame(const wxPoint& pos, const wxSize& size) : ! wxFrame((wxFrame *)NULL, -1, "Global Conflict", pos, size, wxNO_FULL_REPAINT_ON_RESIZE), // | wxNO_FULL_REPAINT_ON_RESIZE | wxCLIP_CHILDREN framePos(pos.x, pos.y), frameSize(size.GetWidth(), size.GetHeight()), mnWidth(size.GetWidth()), mnHeight(size.GetHeight()), *************** *** 103,106 **** --- 103,108 ---- popupControl = NULL; director = NULL; + SetBackgroundColour(*wxBLACK); + Show(FALSE); pythonInterface = new tcSimPythonInterface(); *************** *** 396,401 **** viewer->SetActive(false); ! ! mb3DActive = true; size3D = MODE3D_SMALL; } --- 398,404 ---- viewer->SetActive(false); ! viewer->Show(FALSE); ! viewer->Freeze(); ! mb3DActive = false; size3D = MODE3D_SMALL; } *************** *** 939,944 **** --- 942,949 ---- tacticalMap->Freeze(); // call Freeze() to prevent flicker on resize + wxWindow::Freeze(); tacticalMap->SetSize(wxRect(w,0,mnWidth-w,mnHeight-mnBottomMargin)); tacticalMapSize = mapSize; + wxWindow::Thaw(); } *************** *** 1019,1023 **** break; } ! viewer->Update(gameDateZulu); mpGraphicsEngine->RenderAll(); --- 1024,1028 ---- break; } ! viewer->SetActive(false); viewer->Update(gameDateZulu); mpGraphicsEngine->RenderAll(); *************** *** 1291,1303 **** viewer->Update(gameDateZulu); ! mpGraphicsEngine->RenderAll(); - if (mcOptions.debugLevel > 1) - { - wxMessageBox("pre Frame()\n"); - } - - viewer->Frame(); if (mcOptions.debugLevel > 1) { --- 1296,1311 ---- viewer->Update(gameDateZulu); ! if (directorTime > 0.1f) ! { ! mpGraphicsEngine->RenderAll(); + if (mcOptions.debugLevel > 1) + { + wxMessageBox("pre Frame()\n"); + } + + viewer->Frame(); + } if (mcOptions.debugLevel > 1) { Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tc3DViewer.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** tc3DViewer.cpp 16 Jan 2004 00:04:14 -0000 1.26 --- tc3DViewer.cpp 18 Jan 2004 18:42:41 -0000 1.27 *************** *** 448,452 **** void tc3DViewer::Frame() { ! if (isFrozen) { wxWindow::Thaw(); --- 448,452 ---- void tc3DViewer::Frame() { ! if (isFrozen && isActive) { wxWindow::Thaw(); *************** *** 454,461 **** } if (isActive && camera_group.valid()) - // if (isActive && camera_group) { camera_group->frame(); - //camera_group->sync(); } else --- 454,459 ---- *************** *** 726,731 **** sv->setCullingMode( osg::CullStack::FAR_PLANE_CULLING | ! osg::CullStack::NEAR_PLANE_CULLING | ! osg::CullStack::SMALL_FEATURE_CULLING ); --- 724,730 ---- sv->setCullingMode( osg::CullStack::FAR_PLANE_CULLING | ! osg::CullStack::NEAR_PLANE_CULLING ! //osg::CullStack::VIEW_FRUSTUM_CULLING ! // osg::CullStack::SMALL_FEATURE_CULLING ); *************** *** 867,873 **** tc3DViewer::tc3DViewer(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name) : ! wxWindow(parent, -1, pos, size, wxTRANSPARENT_WINDOW , name), mnHeight(size.GetHeight()), mnWidth(size.GetWidth()) { lonToGridX = C_RADTOM; latToGridY = C_RADTOM; --- 866,875 ---- tc3DViewer::tc3DViewer(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name) : ! wxWindow(parent, -1, pos, size, wxTRANSPARENT_WINDOW, name), mnHeight(size.GetHeight()), mnWidth(size.GetWidth()) { + SetBackgroundColour(*wxBLACK); + Show(FALSE); + lonToGridX = C_RADTOM; latToGridY = C_RADTOM; Index: tcOOBView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcOOBView.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcOOBView.cpp 30 Nov 2003 17:23:52 -0000 1.4 --- tcOOBView.cpp 18 Jan 2004 18:42:41 -0000 1.5 *************** *** 187,191 **** static int nFrameCount = 0; ! if ((nFrameCount++ % 4)==0) {return 1;} // draw every fourth call if (!GetGraphics(pGraphics)) { --- 187,191 ---- static int nFrameCount = 0; ! //if ((nFrameCount++ % 4)!=0) {return 1;} // draw every fourth call if (!GetGraphics(pGraphics)) { |