win32: pass around active shader to parameter dialog
This commit is contained in:
parent
1ea9bcf560
commit
7045cd8478
@ -82,6 +82,10 @@ public:
|
|||||||
bool SetFullscreen(bool fullscreen);
|
bool SetFullscreen(bool fullscreen);
|
||||||
void SetSnes9xColorFormat(void);
|
void SetSnes9xColorFormat(void);
|
||||||
void EnumModes(std::vector<dMode> *modeVector);
|
void EnumModes(std::vector<dMode> *modeVector);
|
||||||
|
GLSLShader *GetActiveShader()
|
||||||
|
{
|
||||||
|
return glslShader;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -617,6 +617,11 @@ int WinGetAutomaticInputRate(void)
|
|||||||
return (int)newInputRate;
|
return (int)newInputRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLSLShader *WinGetActiveGLSLShader()
|
||||||
|
{
|
||||||
|
return OpenGL.GetActiveShader();
|
||||||
|
}
|
||||||
|
|
||||||
/* Depth conversion functions begin */
|
/* Depth conversion functions begin */
|
||||||
|
|
||||||
void Convert16To24 (SSurface *src, SSurface *dst, RECT *srect)
|
void Convert16To24 (SSurface *src, SSurface *dst, RECT *srect)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "wsnes9x.h"
|
#include "wsnes9x.h"
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
#include "../shaders/glsl.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define IsHiRes(x) ((x.Height > SNES_HEIGHT_EXTENDED || x.Width == 512))
|
#define IsHiRes(x) ((x.Height > SNES_HEIGHT_EXTENDED || x.Width == 512))
|
||||||
@ -40,5 +41,6 @@ char *ReadShaderFileContents(const TCHAR *filename);
|
|||||||
void ReduceToPath(TCHAR *filename);
|
void ReduceToPath(TCHAR *filename);
|
||||||
double WinGetRefreshRate();
|
double WinGetRefreshRate();
|
||||||
int WinGetAutomaticInputRate();
|
int WinGetAutomaticInputRate();
|
||||||
|
GLSLShader *WinGetActiveGLSLShader();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7740,14 +7740,17 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ShowWindow(hDlg, SW_HIDE);
|
ShowWindow(hDlg, SW_HIDE);
|
||||||
GLSLShader shader;
|
WinDisplayApplyChanges();
|
||||||
shader.load_shader(_tToChar(GUI.OGLshaderFileName));
|
WinRefreshDisplay();
|
||||||
CShaderParamDlg dlg(shader);
|
GLSLShader *shader = WinGetActiveGLSLShader();
|
||||||
|
if (shader) {
|
||||||
|
CShaderParamDlg dlg(*shader);
|
||||||
if (dlg.show()) {
|
if (dlg.show()) {
|
||||||
SetDlgItemText(hDlg, IDC_SHADER_GLSL_FILE, GUI.OGLshaderFileName);
|
SetDlgItemText(hDlg, IDC_SHADER_GLSL_FILE, GUI.OGLshaderFileName);
|
||||||
WinDisplayApplyChanges();
|
WinDisplayApplyChanges();
|
||||||
WinRefreshDisplay();
|
WinRefreshDisplay();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ShowWindow(hDlg, SW_SHOW);
|
ShowWindow(hDlg, SW_SHOW);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user