2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2010-12-05 14:15:36 +00:00
|
|
|
#ifndef _GFX_DEBUGGER_PANEL_H_
|
|
|
|
#define _GFX_DEBUGGER_PANEL_H_
|
2010-06-09 01:37:08 +00:00
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/notebook.h>
|
2010-12-05 14:15:36 +00:00
|
|
|
#include "Debugger.h"
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2010-12-05 14:15:36 +00:00
|
|
|
class GFXDebuggerPanel : public wxPanel, public GFXDebuggerBase
|
2010-06-09 01:37:08 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-12-05 14:15:36 +00:00
|
|
|
GFXDebuggerPanel(wxWindow *parent,
|
2010-07-19 02:09:34 +00:00
|
|
|
wxWindowID id = wxID_ANY,
|
2010-06-09 01:37:08 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2010-07-19 02:09:34 +00:00
|
|
|
long style = wxTAB_TRAVERSAL,
|
2011-01-05 04:35:46 +00:00
|
|
|
const wxString &title = _("GFX Debugger"));
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2010-12-05 14:15:36 +00:00
|
|
|
virtual ~GFXDebuggerPanel();
|
2010-06-09 01:37:08 +00:00
|
|
|
|
|
|
|
void SaveSettings() const;
|
|
|
|
void LoadSettings();
|
|
|
|
|
|
|
|
bool bInfoLog;
|
|
|
|
bool bPrimLog;
|
|
|
|
bool bSaveTextures;
|
|
|
|
bool bSaveTargets;
|
|
|
|
bool bSaveShaders;
|
|
|
|
|
2010-12-05 14:15:36 +00:00
|
|
|
void OnPause();
|
2011-07-01 20:59:57 +00:00
|
|
|
|
|
|
|
// Called from GFX thread once the GFXDebuggerPauseFlag spin lock has finished
|
2010-12-05 14:15:36 +00:00
|
|
|
void OnContinue();
|
2010-06-09 01:37:08 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
|
|
|
|
wxPanel *m_MainPanel;
|
|
|
|
|
|
|
|
wxButton *m_pButtonPause;
|
|
|
|
wxButton *m_pButtonPauseAtNext;
|
|
|
|
wxButton *m_pButtonPauseAtNextFrame;
|
2010-12-05 14:15:36 +00:00
|
|
|
wxButton *m_pButtonCont;
|
2010-06-09 01:37:08 +00:00
|
|
|
wxChoice *m_pPauseAtList;
|
|
|
|
wxButton *m_pButtonDump;
|
|
|
|
wxChoice *m_pDumpList;
|
|
|
|
wxButton *m_pButtonUpdateScreen;
|
|
|
|
wxButton *m_pButtonClearScreen;
|
|
|
|
wxButton *m_pButtonClearTextureCache;
|
|
|
|
wxButton *m_pButtonClearVertexShaderCache;
|
|
|
|
wxButton *m_pButtonClearPixelShaderCache;
|
|
|
|
wxTextCtrl *m_pCount;
|
|
|
|
|
|
|
|
|
2010-12-05 14:15:36 +00:00
|
|
|
// TODO: Prefix with GFX_
|
2010-06-09 01:37:08 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
ID_MAINPANEL = 3900,
|
2010-12-05 14:15:36 +00:00
|
|
|
ID_CONT,
|
2010-06-09 01:37:08 +00:00
|
|
|
ID_PAUSE,
|
|
|
|
ID_PAUSE_AT_NEXT,
|
|
|
|
ID_PAUSE_AT_NEXT_FRAME,
|
|
|
|
ID_PAUSE_AT_LIST,
|
|
|
|
ID_DUMP,
|
|
|
|
ID_DUMP_LIST,
|
|
|
|
ID_UPDATE_SCREEN,
|
|
|
|
ID_CLEAR_SCREEN,
|
|
|
|
ID_CLEAR_TEXTURE_CACHE,
|
|
|
|
ID_CLEAR_VERTEX_SHADER_CACHE,
|
|
|
|
ID_CLEAR_PIXEL_SHADER_CACHE,
|
|
|
|
ID_COUNT
|
|
|
|
};
|
|
|
|
|
|
|
|
void OnClose(wxCloseEvent& event);
|
|
|
|
void CreateGUIControls();
|
|
|
|
|
|
|
|
void GeneralSettings(wxCommandEvent& event);
|
2011-07-01 20:59:57 +00:00
|
|
|
|
2013-04-19 13:21:45 +00:00
|
|
|
// These set GFXDebuggerPauseFlag to true (either immediately or once the specified event has occurred)
|
2010-06-09 01:37:08 +00:00
|
|
|
void OnPauseButton(wxCommandEvent& event);
|
|
|
|
void OnPauseAtNextButton(wxCommandEvent& event);
|
2011-07-01 20:59:57 +00:00
|
|
|
|
2010-06-09 01:37:08 +00:00
|
|
|
void OnPauseAtNextFrameButton(wxCommandEvent& event);
|
|
|
|
void OnDumpButton(wxCommandEvent& event);
|
2011-07-01 20:59:57 +00:00
|
|
|
|
|
|
|
// sets GFXDebuggerPauseFlag to false
|
2010-12-05 14:15:36 +00:00
|
|
|
void OnContButton(wxCommandEvent& event);
|
2011-07-01 20:59:57 +00:00
|
|
|
|
2010-06-09 01:37:08 +00:00
|
|
|
void OnUpdateScreenButton(wxCommandEvent& event);
|
|
|
|
void OnClearScreenButton(wxCommandEvent& event);
|
|
|
|
void OnClearTextureCacheButton(wxCommandEvent& event);
|
|
|
|
void OnClearVertexShaderCacheButton(wxCommandEvent& event);
|
|
|
|
void OnClearPixelShaderCacheButton(wxCommandEvent& event);
|
|
|
|
void OnCountEnter(wxCommandEvent& event);
|
|
|
|
};
|
|
|
|
|
2010-12-05 14:15:36 +00:00
|
|
|
#endif // _GFX_DEBUGGER_PANEL_H_
|