fall back to black
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Failing after 1m43s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
2026-05-22 16:29:08 +10:00
parent 3bd6aeb52f
commit 521b3cb09e
2 changed files with 6 additions and 23 deletions

View File

@@ -141,30 +141,13 @@ bool SimpleMotionRenderer::InitializeGl(unsigned width, unsigned height)
void SimpleMotionRenderer::RenderFrame(uint64_t frameIndex)
{
if (!EnsurePatternProgram())
{
glViewport(0, 0, static_cast<GLsizei>(mWidth), static_cast<GLsizei>(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<GLsizei>(mWidth), static_cast<GLsizei>(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<float>(mWidth), static_cast<float>(mHeight));
const GLint frameIndexLocation = glGetUniformLocation(mPatternProgram, "uFrameIndex");
if (frameIndexLocation >= 0)
glUniform1f(frameIndexLocation, static_cast<float>(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)

View File

@@ -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);