padding images with less than 16 pixel dimentions?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
binaryONE
Posts: 19
Joined: Tue Apr 18, 2006 2:36 am
Contact:

padding images with less than 16 pixel dimentions?

Post by binaryONE »

This is wierd but i've found that i need to pad the textures that are less than 16 pixels in width/height.

Is that because of the alignment? cuz I wasted lots of time before i figured that i needed to do that... :/
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

Since the GE operates with 16*8 byte blocks, it's most probably because of that. I'll put it on my todo-list to look into minimum alignments...
GE Dominator
binaryONE
Posts: 19
Joined: Tue Apr 18, 2006 2:36 am
Contact:

Post by binaryONE »

Another thing I've noticed is when blitting a bunch of small sprites, one after the other (not in coord. sense, but sequence wise), some sprites don't show up on the screen...

I hope it's me doing something wrong :/

How would u sequence drawing an image made of 4 images?

lets say each image is 32 pixels wide and high and lets say we're using the blit examples advancedBlit function.

When I put 1 second delays in between each of the 4 blits, The screen
was acting very wierd on each draw, I can take screens if it helps...
PlayfulPuppy
Posts: 22
Joined: Fri May 05, 2006 12:04 am

Post by PlayfulPuppy »

I'm not entirely sure, but you *may* be suffering from caching issues. Do certain sprites disappear depending on when you run the program? If so it probably is.

Have a look over here to fund out more about it, but for the cliff-notes version just add sceKernelDcacheWritebackInvalidateAll() somehwere before you draw your scene.
binaryONE
Posts: 19
Joined: Tue Apr 18, 2006 2:36 am
Contact:

Post by binaryONE »

Thanks man, really nice link, ill try to follow the advices given, hope everything checks out.
binaryONE
Posts: 19
Joined: Tue Apr 18, 2006 2:36 am
Contact:

Post by binaryONE »

Yep, the sceKernelDcacheWritebackInvalidateAll(); function solved the issue with sprite missing pixels :)

Thanks a lot guys.

Hey chp, you should write a sticky of sort, 'the do's and don't's' and 'things to know' and include this in :).
Post Reply