Skip to content

Commit 3e6d62e

Browse files
committed
Upload textures for projectors immediately to avoid GL error before first frame arrives.
1 parent 3056d55 commit 3e6d62e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/li/cil/oc2/client/renderer/ProjectorDepthRenderer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ private static RenderInfo getRenderInfo(final ProjectorBlockEntity projector) {
443443
try {
444444
return RENDER_INFO.get(projector, () -> {
445445
final DynamicTexture texture = new DynamicTexture(ProjectorDevice.WIDTH, ProjectorDevice.HEIGHT, false);
446+
texture.upload();
446447
final RenderInfo renderInfo = new RenderInfo(texture);
447448
projector.setFrameConsumer(renderInfo);
448449
return renderInfo;

0 commit comments

Comments
 (0)