Android 4.0/ICS Ice Cream Sandwich question - Android Software Development

Will all apps have to be updated to take advantage of GPU UI rendering, or will Android be able to render all apps via the GPU natively? I desperately hope every app won't require an update to stop using the CPU to render the app's UI with, but I'm afraid that is probably the case. Anyone know for sure?

Roland Deschain said:
Will all apps have to be updated to take advantage of GPU UI rendering, or will Android be able to render all apps via the GPU natively? I desperately hope every app won't require an update to stop using the CPU to render the app's UI with, but I'm afraid that is probably the case. Anyone know for sure?
Click to expand...
Click to collapse
If you look at honeycomb you have to enable hardware rendering in the manifest. But that was because some things don't work properly. Hopefully they've either fixed it so all hardware rendering works, or added a new manifest option to turn off hw instead of turning it on.

Ok; thanks.

HomerSp said:
If you look at honeycomb you have to enable hardware rendering in the manifest. But that was because some things don't work properly. Hopefully they've either fixed it so all hardware rendering works, or added a new manifest option to turn off hw instead of turning it on.
Click to expand...
Click to collapse
This is true, but just wanted to add a bit from what I understand the reason they put it so you had to manually enable it in your app was because HW acceleration caused slowdows on certain types of 2D drawing, especially lines. So this may not change for ICS. If the HW for 3D stuff is still designed around triangles, then the 2d stuff would still be slow.
Basically I think they wanted people to manually enable it to be aware of how and when to use it. If Android were to move to a 3D interface, then there would be more use for it on UI components.
Anyways this is basically what the Google engineers were telling me at the Developer Labs a couple weeks ago. (This is as far as I understood it, I'm no expert in this area, so I may be getting some bits wrong).
Basically this may not really be a "bug" that will ever get "fixed" so to speak. It may be intentional to not use 3d rending when lower-power, faster, 2d rendering would do.

Related

OpenGL and Renderer

Ok im trying to set my program to use OpengGL and i have some questions to thos who know more then i.
Right now my main question is if the Render.OnDrawFrame() is run in a continous loop? I have looked through the official documentation but it doesnt say much. And from this is anything drawn in this function immediately drawn to teh screen? or it as if there was swapbuffer at the end?
Next if i were to do all drawing natively could i simply bypass using the Rendering class all together and manage everything myself?
Well, this thread is a little old, but it's still open and I'd like to discuss a little openGL too.
The Renderer is like a separate thread, once you set the renderer object it will run based on what you define with the setRenderMode(int) method.
From the Android decumentation:
Rendering Mode
Once the renderer is set, you can control whether the renderer draws continuously or on-demand by calling setRenderMode(int). The default is continuous rendering.
Click to expand...
Click to collapse
Managing all the rendering by yourself, without using the standard classes, might be vary challenging. But you don't need to do this to draw natively, there are ways to access native code inside the renderer.
In fact, each gl method call is a native call, you can have a nice performance boost by making only one native call inside the renderer.
Balosen said:
Well, this thread is a little old, but it's still open and I'd like to discuss a little openGL too.
The Renderer is like a separate thread, once you set the renderer object it will run based on what you define with the setRenderMode(int) method.
From the Android decumentation:
Managing all the rendering by yourself, without using the standard classes, might be vary challenging. But you don't need to do this to draw natively, there are ways to access native code inside the renderer.
In fact, each gl method call is a native call, you can have a nice performance boost by making only one native call inside the renderer.
Click to expand...
Click to collapse
Very old indeed!
Yes that is exactly what i did actually. in my onDrawFrame() i call a native method where i do all of the actual drawing(had alot of pre-existing code that made this more practical).

[FIX] Tnt mod based orientation fix for games

Weeds2000 fixed the orientation on our Folio100 to work with games like Asphalt5 and now its possible to play, although graphics are still kinda messed up. but other games like the 3d tilt works nearly perfect now too.
you might find it useful, and VEGAn mod might be able to include this as my FolioTntMod is based of the TNT framework...
Find the download patch i made for our folio in this thread.
it also include a full 360 rotation fix, if you need it
As we all share the same Tegra2 platform and can nearly swap experience here, im posting this to share the fixes weeds2000 made for us...
Hope you find it useful..
Note:
The patch i made might actually work fine as update.zip on your tablet as well, or might need minor adjust to install, but let g tablet modders fix this if needed.
at least now you know its available.
Thank you! One question - do you know what file(s) were altered for the 360 rotation fix? Was it a lib file, for example?
EDIT: Also, to any other modders looking at this, the system.img is a ext2 filesystem image, NOT a yaffs2 image.
roebeet said:
Thank you! One question - do you know what file(s) were altered for the 360 rotation fix? Was it a lib file, for example?
EDIT: Also, to any other modders looking at this, the system.img is a ext2 filesystem image, NOT a yaffs2 image.
Click to expand...
Click to collapse
Roeby wan Kanobi, is this something that could work and be added to TnT Lite? My Clockwork back up just completed
Yes, I can package it as a supplement - I just need to know what to package.
Getting my dev unit ready with TnT Lite 3.1.2. There's also a new music player apk I need to test out.
roebeet said:
Yes, I can package it as a supplement - I just need to know what to package.
Getting my dev unit ready with TnT Lite 3.1.2. There's also a new music player apk I need to test out.
Click to expand...
Click to collapse
This could be another watershed update Also- with the accelerometer corrected, folks will be getting exercise by holding up the G while playing games
added:
Perhaps the one extra update that would be nice is a DSP manager so dB level or gain increases can be made. Modders released a DSP manager on the Incredible that allows increases to 3.5mm and speaker output. Hardware based EQ too.
Perhaps being too picky, but louder speakers would be nice.
Did you see.. they provided the SOURCE!!!!! This is what we need!
roebeet said:
Yes, I can package it as a supplement - I just need to know what to package.
Getting my dev unit ready with TnT Lite 3.1.2. There's also a new music player apk I need to test out.
Click to expand...
Click to collapse
What does the patch change? Would is break things when the application developer fixes the orientation code in their game.
We saw this problem fixed in the application in the Gallery 3D application by google, not in framework. http://android-developers.blogspot.com/2010/09/one-screen-turn-deserves-another.html
roebeet said:
Yes, I can package it as a supplement - I just need to know what to package.
Click to expand...
Click to collapse
okay here are some details.
the framework.jar modified comes from this file: update-smb_a1002-3338-user.zip
the library should be generic, but is required for the gsensor/rotation/orientation fix as part of the new framework.jar changes.
the 2 primary folders in the framework.jar changed are /android/hardware /android/view
you should be able to easily spot the differences in filesizes..
do note: there is another change android\os\Environment.smali as i modified it to work with /mnt/sdcard and /mnt/sdcard/sdcard-disk0 and /mnt/usbdisk-disk0 for compatibility with folio mount functionality.
here is the "vold" also different but works fine with the tap'n'tap framework.
remember that /etc/vold.fstab needs changed to support the more new mount devices if you wish to use that one too.
360 rotation fix is in android\view\WindowOrientationListener$SensorEventListenerImpl.smali
orientation fix is
android\hardware\SensorManager*.smali
but again, the framework.jar is Tap'n'Tap based, so works directly on top of r3338 edition.. and i made a patch in my section with just framework + lib files included.
rothnic said:
We saw this problem fixed in the application in the Gallery 3D application by google, not in framework. http://android-developers.blogspot.com/2010/09/one-screen-turn-deserves-another.html
Click to expand...
Click to collapse
No, as far as i understand, weeds2000 only made the hardware swap sensor reading, so now it acts like a portrait mobile phone, where our Tegra2 has the chip rotated once 90degree.
Dexter_nlb said:
No, as far as i understand, weeds2000 only made the hardware swap sensor reading, so now it acts like a portrait mobile phone, where our Tegra2 has the chip rotated once 90degree.
Click to expand...
Click to collapse
Hmm, so it does a 90 degree rotation. And the device is still a default landscape device. We definitely need to make sure there are no negative effects on games that utilize the acceleromether and worked fine before.
I would assume that the android developers would recommend making this change to framework, instead of handling it in applications if there weren't implications.
Thanks for the explanation - this is something I suspected would fix it, but it's good to see that someone had pushed the idea all the way through to an actual fix.
So, I suspect that when the device boots up, it should be in portrait mode initially (until the sensor kicks in).
roebeet said:
So, I suspect that when the device boots up, it should be in portrait mode initially (until the sensor kicks in).
Click to expand...
Click to collapse
That makes more sense to me if that is true.
I read through the code ... Prior to the code change they were performing the rotation either for Acceleration minus Gy on the y-axis
or Acceleration minus Gz on the z-axis and NOT Acceleration minus Gx on the x-axis. Now the axis swap is always occurring... under all 3 conditions irregardless of sensor.
Dont know why there was an exclusion in the first place for Acceleration minus Gx on the x-axis...
When I get back I will look through the code some more...
rothnic said:
Hmm, so it does a 90 degree rotation. And the device is still a default landscape device. We definitely need to make sure there are no negative effects on games that utilize the acceleromether and worked fine before.
I would assume that the android developers would recommend making this change to framework, instead of handling it in applications if there weren't implications.
Click to expand...
Click to collapse
rothnic said:
I would assume that the android developers would recommend making this change to framework, instead of handling it in applications if there weren't implications.
Click to expand...
Click to collapse
if Google didn't "invent" the different way of reading sensors, there would only be one way of doing it, so developers would not be able to see it, so an update to like 2.2 or higher is now an requirement, right? but if older games do not check, it would work with them, so this fix solves it as i see it.
putting back androidos orientation handling to its original state, as many developers should be reading it.
I have ported the fix for both TnT stock and lite. As well as Vegan beta 4.
http://forum.xda-developers.com/showthread.php?t=892345
gojimi said:
I have ported the fix for both TnT stock and lite. As well as Vegan beta 4.
http://forum.xda-developers.com/showthread.php?t=892345
Click to expand...
Click to collapse
remember its all done by weeds2000 , i cannot/will not take credits for his effort here, i am just sharing the good work done on this fix.
I have released a new version of the fix, this should clean up all the remaining issues with the accelerometer/compass. Code is also much cleaner now. Some weird hacks you may have seen were caused by the legacy API which was used by my test game.
Only known issue up to now is that the mouse coordinates are also rotated.
The source can be found in the zip file attached to the original post, I hope that all changes are prefixed with // XXX:
The source files are based on the nvidia-froyo tree.
Link:
http://forum.xda-developers.com/showpost.php?p=10209624&postcount=38
Doodle jump doesn't work. Game loads upside-down with home buttons on top. If you tilt left you go right...Any fix for this?
Does this work for the VegaN Ginger Edition, or is that fix built into the ROM, I think I am having issues with some games on that ROM.
bmw4aaron said:
Doodle jump doesn't work. Game loads upside-down with home buttons on top. If you tilt left you go right...Any fix for this?
Click to expand...
Click to collapse
I think you can write the developer and tell , that the games is not working normally.. all other games work fine, so why would one game stand out, only reason, bad programming, or misunderstanding of androidOS and orientation. maybe developer thought he should fix the "orientation" in his game on tablet, and forgot other trying to make it reverse.. so: bad programming and choice of developer..he should follow guidelines and not his ideas.

what is opengl rendering?

In the about:debug settings of the browser, there is an option for opengl rendering. What does this do? I also noticed that when i disabled it, it got rid of typing lag
Opengl is a framework that communicates with GPU, so that options enables browser to use video chipset to accelerate rendering.
aligatro2010 said:
Opengl is a framework that communicates with GPU, so that options enables browser to use video chipset to accelerate rendering.
Click to expand...
Click to collapse
So its hardeare acceleration? Kind of a bummer that typing lags hard with opengl enabled
Sent from my G2X
Mine actually Lags less with it on. I Tried turning it off because I thought it would get rid of typing lag but it got worse..
There is some talk that hardware acceleration is broken in OpenGL environments on the Tegra chip. Who knows, if it works for you, then turn it off.
sassafras

[BOUNTY] DPI Spoofing tool for individual Tablet & Phone Apps

I created a bounty thread for this tool in the i717 Galaxy Note General forums but wanted to make it know to the n7000 users too as it should work on all Galaxy Note models (And hopefully many other phones).
The Goal: A tool to spoof DPI at a per-app level to enable use of both Tablet and Phone apps without changing the default system DPI​
Please keeping pledging in the original thread...
http://forum.xda-developers.com/showthread.php?t=1594559
Thanks
Why would you want to use an app not designed for a certain dpi to work in a crippled way ??
It would be much wiser to find a way to change the dpi 'on the fly' as you can do in windows for example. Maybe Google will make it possible one day, as we can already run apps in 'window mode' in ICS
friedje said:
Why would you want to use an app not designed for a certain dpi to work in a crippled way ??
Click to expand...
Click to collapse
You're looking at it the wrong way around.
Telling apps like Gmail, YouTube and tablet specific Apps you have a Tablet DPI enables UI layouts specifically designed for tablet viewing, they are not crippled, they are enhanced.
The Note's display resolution makes it a perfectly capable mini tablet that can run UI layouts designed for tablets. Samsung insist the Note is a phone and have gimped the system by removing tablet support despite the device having a 1280x800 screen.
Some may prefer using tablet mode, others may say it's too small, this tool is for the former rather than the latter.
I have attached pics of the awesome tablet views of Gmail, Youtube and BeyondPod running on my Note.
yes but it makes no sense to run them in tablet ui if you are set on a dpi of 320 even in 1280x800...
friedje said:
yes but it makes no sense to run them in tablet ui if you are set on a dpi of 320 even in 1280x800...
Click to expand...
Click to collapse
In Android DPI is an arbritrary measurement, dont get it mixed up with PPI, all you have to do is tell the App you are at 200 DPI and it will display that way
If that were true, then there would be no need to reboot when changing dpi, it could be done on application level which is, as far as i know, not possible.
However I could be mistaking, i will catch up on it....
As I see it now you would just only get your Gmail in tablet UI, displaying only half of it's content because the rest will fall beside the screen.
I think its a great idea +1
Gmail tablet UI is awesome.
Sent from my GT-N7000 using Tapatalk
DOGSofDOOM said:
I think its a great idea +1
Gmail tablet UI is awesome.
Sent from my GT-N7000 using Tapatalk
Click to expand...
Click to collapse
Don't get me wrong, i think it is a great idea as well.
But i doubt it is actually possible in the current android architecture
I don't care about UI differences. I want the stupid apps to install from the market.
So, far, they all look the same even when they're "incompatible". Typical lame crap.
It is done in the Asus Padfone, so it can't be impossible.
And how do you cope when the apps try scaling to the different LCD Density and half of the display is off the side of the screen, or things are bunched up in the corner of the display?
Wow, this is extremely needed thing! I realy like Tablet Mode on my Note, but can't use it because of many FCs. Sometimes I prefer Tablet Mode (Opera Mobile, Apex Launcher, File managers, Aquamail, Youtube official app and others), and sometimes standart "Phone" mode (Phone apps, S Memo, some small script apps, some games and others). Don't listen to those fools who say that this program is not needed.
This is exactly what I'm longing to see but I don't think it's possible for now as it's rather an OS related issue then just a software issue. I belive Asus padfone works only in low tablet dpi too. Apps only open in tablet mode . You can't change resolution on the fly
Sent from my GT-N7000 using xda premium
The problem is not changing the resolution on the fly,
but changing the dpi on the fly, keeping the same resolution
Totaly agree. I'd love to use those apps in tablet mode with spoofed DPI:
- Poeple
- Calendar
- Mail
- Music
- Calculator
- Settings
But the rest ? I really prefer phone UI for messaging, lockscreen, homescreen and the keyboard cause tablet keyboard is a nightmare to use.
There are some mods to force Settings.apk to work in tablet mode while in phone ui - but that's just wrong cause everything is ugly-huge and not readable. Would be great to force those apps to work AND display like in 180-200dpi while the phone ( and the rest ) works in 320dpi.
But is that even possible ?
That's it!
That is exactly waht I want for the Note!

Best graphics on games

Hi all of you people.
I use my s4 to play some big graphics games and i notice that if i change its name on build.prop i can get better graphics on those games. For Eixample by putting s6 name on build.prop (like the touchwiz ported roms do) you get s6 graphics on s4.
Do you know if there is another thing i can change to improve graphics? (Device product name,etc , i dont know)
Maybe a root app , idk.
Thanks for your time trying to help me!
I'm anything but an expert on any of this stuff but it occurs to me that you may be getting more detailed drawing by fooling apps this way but it has to be at the expense of drawing performance. after all you're asking the phone to do something the games devs didn't think was a good idea.
for increased performance in games disable hardware overlays in development options after you bootup.
maybe get yourself an overclockable kernel (if you can find one for your rom).
the GLtools app allows you to spoof hardware details if that's your thing...
Hardware overlays is disabled by default on most roms. So is Force GPU rendering.
Resurrection Remix rom has an "Force High-End Graphics" option. It is experimental and I don't know if it even works, I prefer better performance.
GDReaper said:
Hardware overlays is disabled by default on most roms. So is Force GPU rendering.
Resurrection Remix rom has an "Force High-End Graphics" option. It is experimental and I don't know if it even works, I prefer better performance.
Click to expand...
Click to collapse
I've never seen a rom that had it disabled, it resets to it's default active position with every boot...

Categories

Resources