diff --git a/src/render/SimpleMotionRenderer.cpp b/src/render/SimpleMotionRenderer.cpp index ac1568b..a481672 100644 --- a/src/render/SimpleMotionRenderer.cpp +++ b/src/render/SimpleMotionRenderer.cpp @@ -141,30 +141,13 @@ bool SimpleMotionRenderer::InitializeGl(unsigned width, unsigned height) void SimpleMotionRenderer::RenderFrame(uint64_t frameIndex) { - if (!EnsurePatternProgram()) - { - glViewport(0, 0, static_cast(mWidth), static_cast(mHeight)); - glDisable(GL_SCISSOR_TEST); - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - return; - } - + (void)frameIndex; glViewport(0, 0, static_cast(mWidth), static_cast(mHeight)); glDisable(GL_SCISSOR_TEST); glDisable(GL_DEPTH_TEST); glDisable(GL_BLEND); - glUseProgram(mPatternProgram); - const GLint resolutionLocation = glGetUniformLocation(mPatternProgram, "uResolution"); - if (resolutionLocation >= 0) - glUniform2f(resolutionLocation, static_cast(mWidth), static_cast(mHeight)); - const GLint frameIndexLocation = glGetUniformLocation(mPatternProgram, "uFrameIndex"); - if (frameIndexLocation >= 0) - glUniform1f(frameIndexLocation, static_cast(frameIndex)); - glBindVertexArray(mPatternVertexArray); - glDrawArrays(GL_TRIANGLES, 0, 3); - glBindVertexArray(0); - glUseProgram(0); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); } void SimpleMotionRenderer::RenderTexture(GLuint texture) diff --git a/src/render/runtime/RuntimeShaderRenderer.cpp b/src/render/runtime/RuntimeShaderRenderer.cpp index 5fa8203..f3afc77 100644 --- a/src/render/runtime/RuntimeShaderRenderer.cpp +++ b/src/render/runtime/RuntimeShaderRenderer.cpp @@ -169,9 +169,9 @@ bool RuntimeShaderRenderer::EnsureStaticGlResources(std::string& error) { const unsigned char pixels[] = { 0, 0, 0, 255, - 96, 64, 32, 255, - 64, 96, 160, 255, - 255, 255, 255, 255 + 0, 0, 0, 255, + 0, 0, 0, 255, + 0, 0, 0, 255 }; glGenTextures(1, &mFallbackSourceTexture); glBindTexture(GL_TEXTURE_2D, mFallbackSourceTexture);