| View previous topic :: View next topic |
| Author |
Message |
Coldbird

Joined: 08 Feb 2007 Posts: 155
|
Posted: Sun Apr 18, 2010 8:30 pm Post subject: GU + Wallpaper Blit + OSK |
|
|
I wanted to ask for something simple, I want to load a 480x272 wallpaper image and get it onto screen using the GU, if possible in the most efficient way.
Then I want to render the Sony OSK ontop of it for querying 4 inputs...
The Sony OSK thing I already have working, but Im still fighting with getting the wallpaper displayed.
Someone has a simple sample at hand maybe? Ive been butchering the PSPSDK samples for some time now without the awaited success. _________________ Been gone for some time. Now I'm back. Someone mind getting me up-2-date? |
|
| Back to top |
|
 |
Oby1Chick
Joined: 13 Feb 2010 Posts: 24
|
Posted: Mon Apr 19, 2010 2:38 am Post subject: |
|
|
Hey Coldbird, I am not sure, but I think the most efficient way to display an image on the screen is the following command :
| Code: |
blitAlphaImageToScreen()
|
You need the include the library needed of course. |
|
| Back to top |
|
 |
Coldbird

Joined: 08 Feb 2007 Posts: 155
|
Posted: Mon Apr 19, 2010 4:14 am Post subject: |
|
|
Which is? _________________ Been gone for some time. Now I'm back. Someone mind getting me up-2-date? |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Tue Apr 20, 2010 6:03 am Post subject: |
|
|
graphics.c from luaplayer source code.
Of course, its really inefficient to call it's functions repeatedly as it does a full read raw image from main memory to draw to screen cycle for each one of those. |
|
| Back to top |
|
 |
Coldbird

Joined: 08 Feb 2007 Posts: 155
|
Posted: Tue Apr 20, 2010 6:08 am Post subject: |
|
|
| Torch wrote: | | Of course, its really inefficient to call it's functions repeatedly as it does a full read raw image from main memory to draw to screen cycle for each one of those. |
I guess its bearable for this special case as I just want to get the job done.
But still im interested, how would you go about optimizing this? _________________ Been gone for some time. Now I'm back. Someone mind getting me up-2-date? |
|
| Back to top |
|
 |
Davee
Joined: 22 Jun 2009 Posts: 59
|
Posted: Tue Apr 20, 2010 6:50 am Post subject: |
|
|
| Coldbird wrote: | | Torch wrote: | | Of course, its really inefficient to call it's functions repeatedly as it does a full read raw image from main memory to draw to screen cycle for each one of those. |
I guess its bearable for this special case as I just want to get the job done.
But still im interested, how would you go about optimizing this? |
By learning how the GU operates and then formatting data to make best use of it of course. |
|
| Back to top |
|
 |
anmabagima
Joined: 01 Oct 2009 Posts: 96
|
Posted: Tue Apr 20, 2010 7:19 pm Post subject: |
|
|
Hi,
using the gu to draw the wallpaper means, that you are using the image as a texture for rendering a sprite which is of the smae size as your screen. You can optimize in some ways.
First: never draw the sprite at once, draw it in eg. 64 pixel wide columns
Second: swizzle the texture for optimized data reads
Third: store the texture in the VRAM to get additional speed |
|
| Back to top |
|
 |
|