pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

Post by BlueCrab »

VQ textures are always going to lose some data. As bogglez implied, VQ textures are based on a palette of blocks of pixels. You're not going to get lossless compression with non-trivial VQ-encoded textures -- it's just a fact of life. :cry:

VQ-encoding is useful for textures for 3D games (where you won't necessarily notice the lossy nature of the compression), but not so much for any 2D pixel art.
tonma
DCEmu Freak
DCEmu Freak
Posts: 82
Joined: Thu Mar 10, 2016 7:14 am
Has thanked: 0
Been thanked: 1 time

Re: pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

Post by tonma »

OK. I will keep my code for 3d futur games. :wink:

I'll make some test with paletted texture.
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

Post by bogglez »

BlueCrab wrote: VQ-encoding is useful for textures for 3D games (where you won't necessarily notice the lossy nature of the compression), but not so much for any 2D pixel art.
Yeah, VQ is more useful for photographed textures (something JPEG will compress better than PNG) than for pixel perfect textures (sprites).
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

Post by bogglez »

Just wanted to give you a heads up that I finished programming the spritesheet tutorial. I just need to write the wiki entry now. I put some effort into it and made it quite comprehensive, so in the meantime here's a preview.

...and done. Here's the tutorial: http://dcemulation.org/?title=PVR_Spritesheets
I'll have some Pizza now :)
Attachments
demo.gif
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
tonma
DCEmu Freak
DCEmu Freak
Posts: 82
Joined: Thu Mar 10, 2016 7:14 am
Has thanked: 0
Been thanked: 1 time

Re: pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

Post by tonma »

It's amazing.
Thanks for your code, it'll really help the community. And me :mrgreen:
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

Post by bogglez »

tonma wrote:It's amazing.
Thanks for your code, it'll really help the community. And me :mrgreen:
You're welcome. Make sure to tell me if something's unclear or doesn't work.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: pvr_mem_malloc / pvr_txr_load / sq_cpy and time ...

Post by bogglez »

I updated the tutorial's zip archive with some fixes as well as the images and added a caveat section, so please redownload.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Post Reply