Skip to content

Commit

Permalink
Upload textures for projectors immediately to avoid GL error before f…
Browse files Browse the repository at this point in the history
…irst frame arrives.
  • Loading branch information
fnuecke committed Feb 7, 2022
1 parent 3056d55 commit 3e6d62e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ private static RenderInfo getRenderInfo(final ProjectorBlockEntity projector) {
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;
Expand Down

0 comments on commit 3e6d62e

Please sign in to comment.