Can you draw part of an image?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
MrBiscuits
Prole
Posts: 5
Joined: Wed Dec 11, 2013 1:47 pm

Can you draw part of an image?

Post 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?
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Can you draw part of an image?

Post 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.
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
MrBiscuits
Prole
Posts: 5
Joined: Wed Dec 11, 2013 1:47 pm

Re: Can you draw part of an image?

Post 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?
bekey
Party member
Posts: 255
Joined: Tue Sep 03, 2013 6:27 pm

[]

Post by bekey »

-snip-
Last edited by bekey on Fri Jan 24, 2014 2:17 am, edited 1 time in total.
User avatar
BozoDel
Party member
Posts: 164
Joined: Fri Nov 01, 2013 10:28 pm

Re: Can you draw part of an image?

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests