Page 33 of 91

Re: "Questions that don't deserve their own thread" thread

Posted: Mon May 04, 2015 11:34 pm
by s-ol
parallax7d wrote:What types can quad be used on?

SpriteBatch and Image I know for sure, how about these types;

Canvas, Framebuffer, Mesh, ParticleSystem, Quad, Texture?
see the wiki for love.graphics.draw:
love.graphics.draw( image, quad, x, y, r, sx, sy, ox, oy, kx, ky )
Arguments

Image or Canvas - image
An Image or Canvas to texture the Quad with.
So Image and Canvas.

Mesh doesn't make sense because a Quad basically is a rectangular Mesh, a ParticleSystem draws a bunch of small images uses it's own Quads and there are no "Texture"s in löve.

Re: "Questions that don't deserve their own thread" thread

Posted: Tue May 05, 2015 7:59 am
by zorg
To expand and modify on Sollos' answer a bit:

Quads Can be used on Textures (Which mean Images and Canvases)
Quads can be used with simply love.draw, spritebatches, but with meshes, you could only do quad:getViewport to set the vertices like that.

Framebuffers no longer exist, they are Canvases.
Dunno what ParticleSystems allow to be used, never used them myself.

Re: "Questions that don't deserve their own thread" thread

Posted: Fri May 08, 2015 5:31 pm
by Bindie
Hey, if I have bump.lua in a sub-folder "libs" and want to require it to a local variable, how do I do this?

I tried:

Code: Select all

local bump = require 'libs\bump'

Re: "Questions that don't deserve their own thread" thread

Posted: Fri May 08, 2015 6:26 pm
by Robin

Code: Select all

local bump = require 'libs.bump'
Backslashes are tricky: \b means the backspace character, 0x08.

Re: "Questions that don't deserve their own thread" thread

Posted: Fri May 08, 2015 6:31 pm
by Bindie
Awesome. Code looks pretty.

Re: "Questions that don't deserve their own thread" thread

Posted: Sat May 09, 2015 1:58 am
by redsled
Here's a question, but I haven't bothered to put out a thread. I'm pretty new here and I see a lot of "OBEY" on peoples avatars. Why?

Re: "Questions that don't deserve their own thread" thread

Posted: Sat May 09, 2015 4:30 pm
by davisdude

Re: "Questions that don't deserve their own thread" thread

Posted: Sat May 09, 2015 5:31 pm
by redsled
Ahh that makes more sense, because all the avatars said Obey and I felt like I was missing out.

Re: "Questions that don't deserve their own thread" thread

Posted: Sat May 09, 2015 5:49 pm
by I~=Spam
Robin wrote:

Code: Select all

local bump = require 'libs.bump'
Backslashes are tricky: \b means the backspace character, 0x08.
You could use a forward slash instead. If I remember correctly windows internally converts forward slashes if needed if lua doesn't already do this.

Re: "Questions that don't deserve their own thread" thread

Posted: Sat May 09, 2015 6:07 pm
by Bindie
That's true, I tried and it worked:

Code: Select all

"assets/bump.lua"