Defer initialization of the GE dbg preview.

Maybe it's causing slowdown on some cards to init a new context?
This commit is contained in:
Unknown W. Brackets committed 2013-09-23 23:45:37 -07:00
1 parent a528f797b1
commit 4cae7bf8d3
2 files changed
+18 -5

No files matched your search

+15 -5
View File
@@ -86,18 +86,23 @@ static void RunPauseAction() {
}
CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent)
: Dialog((LPCSTR)IDD_GEDEBUGGER, _hInstance, _hParent) {
: Dialog((LPCSTR)IDD_GEDEBUGGER, _hInstance, _hParent), frameWindow(NULL) {
breakCmds.resize(256, false);
// TODO: Could be scrollable in case the framebuf is larger? Also should be better positioned.
frameWindow = new SimpleGLWindow(m_hInstance, m_hDlg, (750 - 512) / 2, 40, 512, 272);
// TODO: Why doesn't this work?
frameWindow->Clear();
}
CGEDebugger::~CGEDebugger() {
delete frameWindow;
}
void CGEDebugger::SetupFrameWindow() {
if (frameWindow == NULL) {
// TODO: Could be scrollable in case the framebuf is larger? Also should be better positioned.
frameWindow = new SimpleGLWindow(m_hInstance, m_hDlg, (750 - 512) / 2, 40, 512, 272);
// TODO: Why doesn't this work?
frameWindow->Clear();
}
}
BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {
case WM_INITDIALOG:
@@ -111,10 +116,15 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
Show(false);
return TRUE;
case WM_SHOWWINDOW:
SetupFrameWindow();
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_GEDBG_BREAK:
attached = true;
SetupFrameWindow();
//breakNextOp = true;
pauseWait.notify_one();
breakNextDraw = true;
+3
View File
@@ -31,5 +31,8 @@ public:
protected:
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam);
private:
void SetupFrameWindow();
SimpleGLWindow *frameWindow;
};