Upload textures for projectors immediately to avoid GL error before first frame arrives.

This commit is contained in:
Florian Nücke
2022-02-07 22:55:20 +01:00
parent 3056d55d10
commit 3e6d62ec81

View File

@@ -443,6 +443,7 @@ public final class ProjectorDepthRenderer {
try {
return RENDER_INFO.get(projector, () -> {
final DynamicTexture texture = new DynamicTexture(ProjectorDevice.WIDTH, ProjectorDevice.HEIGHT, false);
texture.upload();
final RenderInfo renderInfo = new RenderInfo(texture);
projector.setFrameConsumer(renderInfo);
return renderInfo;