Willard21 / MineKhan

Minecraft for Khan Academy
81 stars 52 forks source link

Wrong Menu Texture #86

Closed Willard21 closed 1 year ago

Willard21 commented 2 years ago

When it's supposed to draw the dirt texture, it draws the blocks texture atlas instead. Affects the pause screen, main menu, and chat screens after resizing the window. image

Mist-Stego commented 2 years ago

Is there something happening when the browser is trying to render these menu screens? Because that may be the thing that is ruining them.

Is there anyway to manually make the screens when a specific key is pressed? That may allow you as a creator to manually ask the canvas / browser to render the dirt texture and additional text if necessary.

Hope it helps :)

ghost commented 2 years ago

It doesn't happen for me. Actually it happens in multiplayer.

Willard21 commented 2 years ago

The requirement is rendering an entity. Throwing a block in singleplayer will trigger it too.

ghost commented 2 years ago

Try putting this: gl.bindTexture(gl.TEXTURE_2D, dirtTexture) after gl.uniform1i(glCache.uSampler2, 1) in initBackgronds

Willard21 commented 1 year ago

Fixed now