Page 1 of 1

Can you draw part of an image?

Posted: Wed Dec 11, 2013 1:51 pm
by MrBiscuits
Hello I'm new here.

Quick question, is it possible to draw part of an image? I'm specifically looking to draw image textures in triangles (I don't need perspective or anything like that really). I want to draw some pseudo 3D landscapes from above made out of triangles. Is it possible?

Re: Can you draw part of an image?

Posted: Wed Dec 11, 2013 3:10 pm
by vrld
Yes, with [wiki]Quad[/wiki]s, but only rectangular regions. LÖVE 0.9 will have the much more powerful [wiki]Mesh[/wiki]. In the meantime, you can also use stencils to cut out arbitrary shapes.

Re: Can you draw part of an image?

Posted: Wed Dec 11, 2013 3:26 pm
by MrBiscuits
Thanks for the quick reply :D

So for now I guess it is best to just use triangles and later add the mesh when 0.9 comes out as it looks like quads must be axis aligned. Is there any (rough) timescale of when it might be released?

Will it be fast enough to draw loads of textured triangles?

By the way would I have to do manually draw only the triangles I want displayed on screen or does Love2D automatically cull stuff that isn't onscreen?

[]

Posted: Wed Dec 11, 2013 3:33 pm
by bekey
-snip-

Re: Can you draw part of an image?

Posted: Wed Dec 11, 2013 5:29 pm
by BozoDel
MrBiscuits wrote:By the way would I have to do manually draw only the triangles I want displayed on screen or does Love2D automatically cull stuff that isn't onscreen?
I'm a noober, so I don't really know, but I've seen that advice in the forums a couple times: you should only draw stuff that the camera will see.