MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnPaint

Method OnPaint

editor/TextureGrWnd.cpp:777–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776
777void CTextureGrWnd::OnPaint() {
778 CPaintDC dc(this); // device context for painting
779
780 // Draw what's on the screen back page to the desktop
781 if (theApp.paused())
782 return;
783
784 if (m_StartFlip) { // do if a flip was signaled
785 m_StartFlip = FALSE;
786
787 if (DoOpenGL) {
788 HWND save_wnd;
789 oeLnxApplication *app;
790
791 app = (oeLnxApplication *)Descent;
792
793 // save_wnd = (HWND)app->m_hWnd;
794 // app->m_hWnd = (HWnd)m_hWnd;
795 // rend_SetOpenGLWindowState (1,Descent,NULL); // LGT: not defined anymore
796
797 rend_Flip();
798
799 // rend_SetOpenGLWindowState (0,Descent,NULL); // LGT: not defined anymore
800 // app->m_hWnd = (HWnd)save_wnd;
801 } else {
802 m_grScreen->flip();
803 m_grViewport->clear();
804 }
805 }
806
807 // Do not call CWnd::OnPaint() for painting messages
808 if (!m_Movable) { // print out window title, since there is no caption
809 dc.SetBkMode(TRANSPARENT);
810 dc.SetTextColor(RGB(192, 192, 192));
811 dc.TextOut(10, 10, m_Name, lstrlen(m_Name));
812 // m_grViewport->puts(10,10, m_Name);
813 }
814}
815
816void CTextureGrWnd::OnDestroy() {
817 // mprintf(0, "CTextureGrWnd::OnDestroy:: m_grScreen\n");

Callers

nothing calls this directly

Calls 5

pausedMethod · 0.80
flipMethod · 0.80
SetTextColorMethod · 0.80
rend_FlipFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected