Why the 512 limit on images

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Gbox
Posts: 1
Joined: Wed Dec 21, 2005 3:05 pm

Why the 512 limit on images

Post by Gbox »

Im just curious, why are image dimentions limited to 512x512?
NovaCaine
Posts: 34
Joined: Tue Dec 20, 2005 3:31 pm
Location: New Zealand
Contact:

Post by NovaCaine »

my guess would be memory constraints...
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

sceGuTexImage seems to have problems with images bigger than 512x512. The only way around this that I could see is to specify a smaller image to sceGuTexImage, with the appropriate memaligned x/y offset.

SDL compensates for images greater than 512x512 at the cost of some extra complexity. LuaPlayer probably doesn't workaround the limitation for the sake of simplicity.
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

The hardware does not support textures wider than 2^9 (512). You can of course do as rinco suggests and wrap this in multiple passes with a shifting base-address and a buffer-width that skips unneeded parts of the texture.
GE Dominator
Brunni
Posts: 186
Joined: Sat Oct 08, 2005 10:27 pm

Post by Brunni »

I'm trying to do this but I've got a problem: the texture block width (third argument to sceGuTexImage) can't be larger than 1024 (else it will be clamped to 1024, or if it's greater than 2048 it will be wrapped), so it is impossible to draw textures larger than 1024xsomething, right?
Do you have any idea to improve that? Thanks :)
Sorry for my bad english
Image Oldschool library for PSP - PC version released
Altair
Posts: 76
Joined: Sat May 20, 2006 2:33 am
Location: The Netherlands

Post by Altair »

That limit is only for png's. JPG's can be larger, but I don't know what the limit on them is, my biggest image I've blitted is 1000x1000.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

chp wrote:The hardware does not support textures wider than 2^9 (512).
You should listen to chip.
Post Reply