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