Nazariglez / notan

Cross-platform multimedia layer
https://nazariglez.github.io/notan-web/
Apache License 2.0
763 stars 53 forks source link

Add with_mipmap, with_wrap to RenderTextureBuilder #279

Closed fand closed 10 months ago

fand commented 11 months ago

https://github.com/Nazariglez/notan/assets/1403842/56bc25cf-be02-4726-b438-08e90d004eca

Hi 👋 Thank you always!

I found RenderTextureBuilder doesn't have mipmap & wrap settings. These features are already implemented for normal Texture, so I copied with_mipmap() etc from TextureBuilder to RenderTextureBuilder.

Then I noticed that mipmaps for RenderTexture is not being generated. gl.generate_mipmap() is called in GlowBackend::end(), but the RenderTexture was not bound and GPU can't generate the mipmap for the RT. I added gl.bind_texture() before gl.generate_mipmap(), and I also did some tweak on InnerRenderTexture and GlowBackend for this.

Changes

Nazariglez commented 10 months ago

Oh this is awesome, thank you so much! It looks great to me. Can I ask you to add some lines to the changelog?

fand commented 10 months ago

@Nazariglez Thx for review! Sure, I edited the CHANGELOG and pushed. b1957ef

Nazariglez commented 10 months ago

Thank you so much!