Page 1 of 1

How to properly use "newMesh"?

Posted: Sat Dec 14, 2013 11:28 pm
by LoneArtisan
Nil

[]

Posted: Sat Dec 14, 2013 11:38 pm
by bekey
-snip-

Re: How to properly use "newMesh"?

Posted: Sun Dec 15, 2013 3:07 pm
by LoneArtisan
Nil

[]

Posted: Sun Dec 15, 2013 4:55 pm
by bekey
-snip-

Re: How to properly use "newMesh"?

Posted: Sun Dec 15, 2013 7:17 pm
by slime
I added a couple simple examples to the [wiki]love.graphics.newMesh[/wiki] wiki page.

Re: How to properly use "newMesh"?

Posted: Sun Dec 15, 2013 9:48 pm
by LoneArtisan
Nil

Re: How to properly use "newMesh"?

Posted: Sun Dec 15, 2013 10:26 pm
by slime
All computers which can run LÖVE can also use meshes. Are you sure you're running version 0.9.0?

Re: How to properly use "newMesh"?

Posted: Sun Dec 15, 2013 11:20 pm
by LoneArtisan
Nil

Re: How to properly use "newMesh"?

Posted: Sun Dec 15, 2013 11:29 pm
by Ref
Thanks slime for the mesh examples.
They work for me.

Minor point in your example containing function CreateTexturedCircle(image, segments)
The following code:

Code: Select all

    -- Create the vertices at the edge of the circle.
    for theta=0, math.pi*2, (math.pi*2)/segments do
should really be:

Code: Select all

for theta=0, math.pi*2*(1+1/segments), (math.pi*2)/segments do
Otherwise, at some segments choices (12,16, ...) you get missing sectors.

Re: How to properly use "newMesh"?

Posted: Mon Dec 16, 2013 12:05 am
by slime
LoneArtisan wrote:Yes. When I double click Love.exe, I see the baby with the glasses. To run the game, I drag the folder, with the main file inside, to Love. I even copied and pasted the exact sample code you added from the wiki but I still get the blue error screen above.
Just to make sure: you're using the release version of 0.9.0 from the homepage, right? There was a time period while 0.9.0 was being developed when love.graphics.newMesh didn't exist yet but the new no-game screen did (and semi-nightly Windows builds were being created as well), but that was several months ago.
Ref wrote:Otherwise, at some segments choices (12,16, ...) you get missing sectors.
Fixed, thanks.