Use Quad as Mesh Texture
Posted: Mon May 14, 2018 12:55 pm
My Games Map is based on textured Meshes.
It works fine if I'm using a static Image as the Texture.
Now I'm trying to animate the Maps Tiles by using Quads in a Sprite Sheet as the Texture for the Meshes and switch them for every step in the Animation.
Problem being that Mesh:setTexture doesn't accept a Quad as an Arguement, neither does love.graphics.draw when using a Mesh as the drawable.
The only other way I can think of is defining a seperate Mesh for each Sprite, then cycling the Meshes to archieve an Animation.
Is the first approach even possible?
If so, which would run faster, given that the cycling happens thousands of times per Frame?
It works fine if I'm using a static Image as the Texture.
Now I'm trying to animate the Maps Tiles by using Quads in a Sprite Sheet as the Texture for the Meshes and switch them for every step in the Animation.
Problem being that Mesh:setTexture doesn't accept a Quad as an Arguement, neither does love.graphics.draw when using a Mesh as the drawable.
The only other way I can think of is defining a seperate Mesh for each Sprite, then cycling the Meshes to archieve an Animation.
Is the first approach even possible?
If so, which would run faster, given that the cycling happens thousands of times per Frame?