PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

SetDisplayMode + CreateSurfaces

I was wondering if anyone could explain the reason why when you change the screen rotation all the surfaces have to be reloaded? (a slow procedure when you have lots of assets)

is this purely a decision based on making the final backbuffer to frontbuffer blit faster? i.e. so that all the pixels are aligned in the same directions for double pixel blitting

otherwise, it seems like a tremendous pain, and it stops otherwise instant screen rotations

I'm guessing from the docs that I can write my own routine for blitting the backbuffer to the frontbuffer if I prefer to avoid the reloads?

thanks in advance for any answers :D
is this purely a decision based on making the final backbuffer to frontbuffer blit faster? i.e. so that all the pixels are aligned in the same directions for double pixel blitting


Yes.. Perhaps it is a slow procedure, but how often do you rotate the display anyways?
my problem is...

I want the user to have the ability to rotate the screen from an ingame menu option, the only problem with the way that this is currently done, is that when they rotate the screen, it takes a noticable amount of time to reload all the assets

I'm developing for the Smartphones which have pretty slow file access compared to desktops, and so reloading a few assets can take around 15 seconds - which is a long time to wait for a menu option you may then want to change back again

any suggestions? or it just life?

if I want to write my own backbuffer to front buffer blit, how easy is this? and are the surfaces stored in custom formats that will make this awkard to do?

many thanks

muff
One suggestion is, instead of having the menu item rotate the screen while appearing hung, have it launch a dialog that shows a progress while the screen is rotating.

One of the GapiDraw samples does this. Check it out.

Just making your dialog say something like "optimizing screen..." and people won't complain.
Does GAPIDraw allow an app to submit pre-rotated images so that GD doesn't have to do this rotation under the hood?

Put another way, if I know that I'm running on an iPaq with a native landscape screen orientation, but my game is designed to run in portrait mode, can I pre-rotate all of my artwork and submit this to GD with a flag that says, don't bother rotating these on load?
Does GAPIDraw allow an app to submit pre-rotated images so that GD doesn't have to do this rotation under the hood?


No

Put another way, if I know that I'm running on an iPaq with a native landscape screen orientation, but my game is designed to run in portrait mode, can I pre-rotate all of my artwork and submit this to GD with a flag that says, don't bother rotating these on load?


Unfortunately no.
mlepage wrote:
One suggestion is, instead of having the menu item rotate the screen while appearing hung, have it launch a dialog that shows a progress while the screen is rotating.

One of the GapiDraw samples does this. Check it out.

Just making your dialog say something like "optimizing screen..." and people won't complain.


this is what I'm currently doing :D

but when you are on a mobile platform, people tend to be less patient (guess they cant make a cup of tea at the same time or something)

I'm just exploring possible alternatives by asking these questions

thanks for the feedback though

muff