fix: Disable postprocessing shaders in Web version
This commit is contained in:
parent
637cdd7084
commit
69c5d553b5
@ -77,7 +77,10 @@ namespace hex {
|
|||||||
this->initImGui();
|
this->initImGui();
|
||||||
this->setupNativeWindow();
|
this->setupNativeWindow();
|
||||||
this->registerEventHandlers();
|
this->registerEventHandlers();
|
||||||
|
|
||||||
|
#if !defined(OS_WEB)
|
||||||
this->loadPostProcessingShader();
|
this->loadPostProcessingShader();
|
||||||
|
#endif
|
||||||
|
|
||||||
ContentRegistry::Settings::impl::store();
|
ContentRegistry::Settings::impl::store();
|
||||||
ContentRegistry::Settings::impl::load();
|
ContentRegistry::Settings::impl::load();
|
||||||
@ -791,10 +794,14 @@ namespace hex {
|
|||||||
glfwMakeContextCurrent(backupContext);
|
glfwMakeContextCurrent(backupContext);
|
||||||
|
|
||||||
if (shouldRender) {
|
if (shouldRender) {
|
||||||
|
#if !defined(OS_WEB)
|
||||||
if (m_postProcessingShader.isValid())
|
if (m_postProcessingShader.isValid())
|
||||||
drawWithShader();
|
drawWithShader();
|
||||||
else
|
else
|
||||||
drawImGui();
|
drawImGui();
|
||||||
|
#else
|
||||||
|
drawImGui();
|
||||||
|
#endif
|
||||||
|
|
||||||
glfwSwapBuffers(m_window);
|
glfwSwapBuffers(m_window);
|
||||||
}
|
}
|
||||||
@ -823,6 +830,7 @@ namespace hex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Window::drawWithShader() {
|
void Window::drawWithShader() {
|
||||||
|
#if !defined(OS_WEB)
|
||||||
int displayWidth, displayHeight;
|
int displayWidth, displayHeight;
|
||||||
glfwGetFramebufferSize(m_window, &displayWidth, &displayHeight);
|
glfwGetFramebufferSize(m_window, &displayWidth, &displayHeight);
|
||||||
|
|
||||||
@ -891,6 +899,7 @@ namespace hex {
|
|||||||
glDeleteBuffers(1, &quadVBO);
|
glDeleteBuffers(1, &quadVBO);
|
||||||
glDeleteTextures(1, &texture);
|
glDeleteTextures(1, &texture);
|
||||||
glDeleteFramebuffers(1, &fbo);
|
glDeleteFramebuffers(1, &fbo);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::initGLFW() {
|
void Window::initGLFW() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user