Po2 Syndrome

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
baconhawka7x
Party member
Posts: 491
Joined: Mon Nov 21, 2011 7:05 am
Location: Oregon, USA
Contact:

Po2 Syndrome

Post by baconhawka7x »

Ah yes. Po2 syndrome. Some thing that I do not suffer from:) But I had a quick question about it.

I know it happens when someone loads an image that isn't a power of two. But, can I draw a rectangle(love.graphics.rectangle) that isn't a multiple of two? Or will the po2 syndrome still occour?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Po2 Syndrome

Post by kikito »

Rectangles do not have po2 issues.
When I write def I mean function.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Po2 Syndrome

Post by Jasoco »

Only Images suffer from Po2. And only before 0.8.0 as is my understanding. Can someone shed the light on that once and for all.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Po2 Syndrome

Post by Nixola »

Yes, only images should suffer from PO2 Syndrome, and they'd suffer from it in 0.8.0 too, if LOVE didn't autopad images
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
slime
Solid Snayke
Posts: 3163
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Po2 Syndrome

Post by slime »

Images and canvases/framebuffers both "suffer" from the problem that older video cards can't deal with non power-of-2 dimensions. 0.8.0 works around the problem for images (but not canvases) by auto-padding non power-of-2 images with transparency on computers that don't support it. If you intend to use wrapping on non power-of-2 images, be aware that it may look messed up on those computers.
User avatar
baconhawka7x
Party member
Posts: 491
Joined: Mon Nov 21, 2011 7:05 am
Location: Oregon, USA
Contact:

Re: Po2 Syndrome

Post by baconhawka7x »

Alright, thanks.
Lynnjones
Prole
Posts: 1
Joined: Mon Apr 30, 2012 5:01 pm

Re: Po2 Syndrome

Post by Lynnjones »

Thanks for clearing that up
ONE LOVE
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 5 guests