elm-webgl icon indicating copy to clipboard operation
elm-webgl copied to clipboard

Fix texture filtering

Open skrat opened this issue 9 years ago • 6 comments

Loading textures was broken. I fixed it by removing loadTextureRaw and actually using the TextureFilter type, which was there, but wasn't used anywhere. Now it is. Also the thwomp.elm example is fixed.

skrat avatar Sep 28 '15 12:09 skrat

You can now run elm-reactor in your working copy of elm-webgl and have the thwomp.elm example working.

skrat avatar Sep 28 '15 13:09 skrat

Haven't looked closely, but the idea is that the texture function should have a sensible default rather than it always be required (beginner friendly don't have to think about filters). So I don't like the removal of that. What do you think?

johnpmayer avatar Sep 28 '15 15:09 johnpmayer

Well, it was broken in the first place, it wasn't even working because you were calling the native function with 2 args, while it was only taking one. I don't have an opinion on the sensible default, I guess it's ok, and that's why there is loadTexture function. For the rest, there is loadTextureWithFilter, right? So I didn't really remove that sensible default.

skrat avatar Sep 28 '15 15:09 skrat

This seems correct, internally more idiomatic, and externally preserves sensible defaults.

rozgo avatar Sep 30 '15 07:09 rozgo

Any chance of having this merged?

skrat avatar Oct 02 '15 11:10 skrat

Any word on merging this in? I've hit this error as well, and it'd be nice to use textures in my game.

faithanalog avatar Oct 28 '15 22:10 faithanalog