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->setupNativeWindow();
|
||||
this->registerEventHandlers();
|
||||
|
||||
#if !defined(OS_WEB)
|
||||
this->loadPostProcessingShader();
|
||||
#endif
|
||||
|
||||
ContentRegistry::Settings::impl::store();
|
||||
ContentRegistry::Settings::impl::load();
|
||||
@ -791,10 +794,14 @@ namespace hex {
|
||||
glfwMakeContextCurrent(backupContext);
|
||||
|
||||
if (shouldRender) {
|
||||
#if !defined(OS_WEB)
|
||||
if (m_postProcessingShader.isValid())
|
||||
drawWithShader();
|
||||
else
|
||||
drawImGui();
|
||||
#else
|
||||
drawImGui();
|
||||
#endif
|
||||
|
||||
glfwSwapBuffers(m_window);
|
||||
}
|
||||
@ -823,6 +830,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
void Window::drawWithShader() {
|
||||
#if !defined(OS_WEB)
|
||||
int displayWidth, displayHeight;
|
||||
glfwGetFramebufferSize(m_window, &displayWidth, &displayHeight);
|
||||
|
||||
@ -891,6 +899,7 @@ namespace hex {
|
||||
glDeleteBuffers(1, &quadVBO);
|
||||
glDeleteTextures(1, &texture);
|
||||
glDeleteFramebuffers(1, &fbo);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Window::initGLFW() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user