Multiscreen Support - Only autoscale for large screens - Android Software Development

Hi,
i am developing a game that uses canvas.
My game handles the graphic and all others for small screens and for normal screens.
I want to use the Android internal "Auto-Upscaling Feature" only for large Screens.
I put the following in the manifest file:
PHP:
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="false"
android:anyDensity="false"/>
That should work? But Android does also downscale the graphics for smallScreens.
Has anyone an idea?
Thank you! And sorry for my bad English
[funcoder]

Hmmm, maybe try setting anyDensity to true? I don't know if it will work. Do you have separate graphic resources for small screens? I also am trying to work out the most effective and elegant way to support multiple screens for something I am working on.

Related

VGA to QVGA

Hi frens, I would like to know is there anyway to change our device from VGA to QVGA? I mean maybe using some certain software we can toggle between using QVGA or VGA..something like that
Because VGA can't enjoy many cool interface things like Cube, Ifonts, etc
pliz help
did you find a solution ?
i am looking for the same soultion ? did someone find ?
i need it ASAP ?
thx
Not looking likely
Hi Guys
It seems fairly certain to be a no go see my previous threads
http://forum.xda-developers.com/showthread.php?t=350157
http://forum.xda-developers.com/showthread.php?t=347532
http://forum.xda-developers.com/showthread.php?t=351589
Sorry they are all a bit short but you will get the general idea, basically it comes down to there being no apparent way to hotswitch the dpi on a per app basis. The closest thing to any chance of it working would be to have a patch or layer that can emulate a lower res screen which GAPI for HPC's http://www.wincesoft.de/html/gapi_for_hpc_s.html is capable of doing for WinCE boxes that have widescreen resolutions but want to run an older 320x240 game or app so any potential solution would likely have to work along the same lines.
However the main issue is that the gx.dll method would not work in most cases as they are now quite heavily tied into the roms (certainly on my Athena) so I could never test it out fully, a generic or emulation layer based gx.dll would most likely 'break' the newer phones if it was forced into the windows directory and from some basic testing before simply placing the HPC gx.dll in the app directory does not enable you to make use of it as the base gx.dll is already resident in ram when the phones are started. I also tried reshacking a couple of apps and changing it to look for xg.dll and renaming the HPC one to match but that just broke everything as you have to re-sign the app which I managed but it just plain refuses to run and either brings up an error message or just does nothing when you run it.
Wow a bit long winded sorry about that but it may help anyone who wants to take up the challenge

Render-To-Texture with HTC Diamond 2

Hi everyone,
I have a small technical problem to solve and hopefully someone knows an answer for it. Someone gave me a HTC Diamond 2 (very nice toy I think). I don’t know which hardware is exactly inside the phone but I assume it’s an ATI ImageOn 2300 which fully supports OpenGL ES 1.0 + Extension Pack (that’s what GL_EXTENSION is saying). And all of these extensions are doing fine. As everyone knows HTC is not providing a D3D driver for their phones and all other drivers I have seen are just a wrapper around OpenGL ES. So using D3D is currently not an option.
I have to write an application which requires some render-to-texture functionality in realtime and here my problems are starting to grow.
[1] glCopyTexImage2D:
I recognized that glCopyTexImage2D() is very slow. My framerate is dropping dramatically from >100 frames down to ~20 frames. Somehow this is done in software by the driver and not hardware- accelerated. glCopyTexSubImage2D() is even more slow (down to ~10 frames per second), but both functions are working. I tried to move it into a different thread, but the driver is not supporting shared contexts. Also it’s not supporting two bound contexts at the same time with two different windows and threads. So this can’t be improved or I’m doing something wrong.
[2]PBuffers:
PBuffer are working fine. But PBuffers which can be bound to a texture are not supported by OpenGL ES 1.0. And that’s what happens also on this ATI card.
[3]GL_OES_framebuffer_object:
This was my preferred choice. But framebuffers are not officially supported by the installed OpenGL driver. But the libgles_cm.dll on the HTC is exporting these functions so I tried them and recognized that they are not working correctly. Somehow the vertex pipeline is allowing only triangles in the center of the viewport. All others will be discarded. When I turn it off it renders correct. Using glDrawTexiOES() will be ignored while using framebuffers. I assume that either the current implementation of the framebuffers is just waste of some development guys or the functionality is locked in some way.
[4]D3D:
Normally D3DM is supporting to switch between different rendertargets. But we are all know the D3D problem. I tested some other D3D drivers but they are not usable. Also I can’t imagine how render-to-texture will be implemented in these drivers while it’s not working in OpenGL.
I’m wondering what TouchFlow3D is using internally, whether they are using render-to-texture or not. The only thing I know is that they are using OpenGL ES and some extensions. But Manila.exe is querying the functions of libgles_cm.dll during runtime. So I have to write a few proxy dlls first and need to hook into the system to track what they are doing. And I don’t want to spend time on this.
Does someone knows an alternative to do some render-to-texture on the ATI or knows some secrets of the libgles_cm.dll which I don’t know? There are a lot of private functions inside but can’t find some documentation about it. Also ATI and Qualcomm are not very helpful to me.
Thanks.
Maybe, glReadPixels and then glTexSubImage2D (what probably glCopyTexImage2D is doing)?
(I know that this goes two times over the graphics bus, but you never know...)
What kind of scene (number of triangles, lights, textures) are you rendering with > 100fps?
glReadPixels() + glTexImage2D() is even more slow than glCopyTexImage2D...
Also this can't be parallized. I thought using AHI2DATI.dll instead to do the same thing, but I don't know how to get a surface handle from a OpenGL texture id.
>>>What kind of scene?
A very simple scene yet. Only a few depth sorted + material sorted objects (via VBO) with some textures (backed lighting) on it. Textures are compressed. Currently no lighting, no skinning or other things. While the render thread is waiting for glFinish() to return, a second thread prepares the next frame. Also the rendering thread is not redrawing the entire viewport each time.
The OpenGL texture id is the handle. There's nothing more you can do with it. PBuffers or framebuffer objects are the only way I know for doing performant render to texture in OpenGL.
No...I mean the surface handle of the AHI2DATI library. Here you have access to the raw data of the surface. Somehow the libgles_cm.dll uses these surfaces for it own buffers and/or textures or not?!
But this is not really useful unless someone tells us whats going on inside libgles_cm.dll.
See:http://greengalaxy.wordpress.com/2009/04/18/ati-direct-access-to-hardware/
Hi jeansmsixer, I don't think there is no efficient way to do it. Have you tried eglCopyBuffers?
Aren't all textures stored in system memory? - they surely have to be because the device reports no available video mem.
Even if you get a pointer to the color buffer, it's impossible to wrap the memory in a HBITMAP to select onto a HDC and use GDI fonts for instance. (which is what I need to do).
If you do write the proxy dll like you were suggesting, can you please let me know what TF3D does for fonts? Are they textures or have they somehow mixed 3D with GDI?
Hi jeansmsixer, something else you could try is what is described here:
http://brewforums.qualcomm.com/showthread.php?t=10668
Looking on glbenchmark.com it looks like HTC devices support the extension. You should be able to get a pointer directly to the color buffer (which I presume is in normal system memory) so you could copy off pixels fairly efficiently with your own memcpy(). However, you will need to eglWaitGL() etc to ensure 3d stuff is complete before attempting to access it.
I love the irony of the only helpful information for WM opengl being found on a brew site for symbian. If WM7 is as terrible as the current mess, then I'm moving to iPhone.

HTC community? Yes but not for all

Hello to all!!
It has been a while since I possess telephones under Windows mobile and also, since I navigate it fabulous forum!
When I discovered this forum, I was really very satisfied to have purchased my first one HTC because I had the impression to be a member of a big family!!!!
I thank all the active persons and all the developers on this forum which allowed me to return my phone different from the others and to pull the best!!!
But today, I have to say that I am a little disappointed … I have purchase since a few months a HTC HD Mini because this phone is in my opinion, the best compromise between power, technology, size and still under Windows mobile 6.5.
The HD2 pleased me a lot, but too big for my use … Thus this small phone was really the one that I waited!
Why am I disappointed? Simply because the screen of this phone has a HVGA resolution screen (320x480) and because this one is not current. Everything the magnificent developments which are realized today continues to support the resolution QVGA / WQVGA / VGA / WVGA but not the HVGA.
I find it very it's a pity. Today, I have the impression to be thrown rejected by this HTC community simply because I possess a telephone which is slightly different from the others. And nevertheless, as I said it higher, it is a HTC, he possesses characteristics to envy nothing to the others and he turns under Windows mobiles 6.5. His only defect (if we can say that it is a defect) is the resolution of its screen.
Sirs developers, you who often put your efforts in the service of the others by carrying your applications in various resolutions, could think to us? We who are not competent to develop but who we who support you and we who as want you to pull the maximum of their Windows mobile phone???
Thanks to all by advance !!
Sorry for my English…. It is a resverso translation
You just speak right out of my heart!!!
Devs, please think of us!
In my perspective, I think the hardest part of creating a program, is that he run according to the expected result. The hardest part is to encode the program algorithm.
Then, adapt the same program at different screen sizes is much less difficult! Especially when that program is already adapted to a resolution of 240x320 (QVGA) and a resolution of 480x640 (VGA). From there, I think adapting this program to the resolution of 320x480 (HVGA) is no longer a question of difficulty, but just a question of willingness.
Please gentlemen developers and programmers, think of us when you create your great applications!
Maybe it is true that we are not likely to have a HD Mini, but the fact remains that it's a great phone, branded HTC and running Windows Mobile 6.5.
I do not want to offend anyone, I just want to share my sentiment.
Kind regards, JBS68
Sorry for my English…. It is a google translation
please think of us!
TT_TT
Helle to all !!
Just a small message to promote the subject!
Unless a moderator wants to stick it?
Yes, it can be done, but it can be an awful lot of extra work. If you are going to try and develop an application that will run on as many different platforms as possible, this will have to be done at design time before you have written a single line of code. Trying to retro fit this to an app you have already created, can almost involve a complete rewrite.
Firstly, if you do not have such a device to hand, on which to test the program, you will have to get Visual Studio to create a device with the correct screen size for the emulator to run. HVGA is not one of the stock emulator images. Having created it, when you start it up under the emulator, even Windows Mobile gets a bit confused, see the attached image HVGA. It tries to centre the WM 5.0 stock wallpaper in the screen area, leaving the pale blue gap visible at the top and bottom.
Running the 6.5.3 images as 320x480 makes them virtually unusable, as the Titanium user interface completely screws up; see the second image HVGA65. The 6.5.3 Windows icon 'Start' button does nothing when pressed, you are completely stuck, because you cannot get control panel to run in order to turn the Titanium stuff off.
At least you can test programs against WinMo 5.0 on 320x480.
In the list of applications in my signature below, 5x5 will run perfectly on a HVGA device. Originally, users of Samsung Omnias (240x400) just got a blank screen. The program was originally hard coded to deal with standard QVGA screens in landscape or portrait. Ooooops! Large parts of the program had to be rewritten. It is now designed to dynamically scale the grid to 90% of the shortest side of the client area, and centre itself accordingly. It will now run on any sized screen, even those that have not been released yet! It was a lot of work to make it do this.
Sudoku player will work, but it does not resize, it just positions itself in the middle of the screen. To get this to scale to full size as per 5x5 would involve an enormous amount of work. The drawing would have to be made dynamic as would the font(s) used by the program. It currently gets away with just using the system font, yes let's hear it, lazy programming. It only just fits on a square 240x240 screen.
Siglog is just an app that fills text areas with data; its main purpose is to display and log data; the UI is not that important. It is not optimised for any screen layout, and will just appear in the top left 240x320 area of the screen.
At some stage I might improve Sudoku Player and Siglog so that they have totally dynamic displays, but I have to ask myself, is it really going to be worth all the effort involved?
stephj said:
Yes, it can be done, but it can be an awful lot of extra work. If you are going to try and develop an application that will run on as many different platforms as possible, this will have to be done at design time before you have wriiten a single line of code. Trying to retro fit this to an app you have already created, can almost involve a complete rewrite.
..........................
Click to expand...
Click to collapse
To begin, thank you for taking the time to read and answer my thread !
I must say that I too am a bit of development. Of course, not at the level of what you do, but I trained alone and I develop professional visual basic macros (especially for Excel)...
On the first point, I completely agree with you, if the resolution was not taken into account at the begin, it is often difficult to integrate in the future without having to write everything.
For the second point, I did not that you need an emulator for other resolutions, and looking at the pictures, I understand that it is not easy to exploit these emulators!
Now, I'm not asking that all applications be re written to make them work on my phone, but when you develop new applications, consider this resolution (if possible!)
I see that there are applications that are developed with the interface SENSE. And although those can easily be adapted (I think).
Another example, when an application interface is based on a skin with areas for displaying datas (example, with a XML file format) could also adapt more easily.
In conclusion, thank you for taking the time to reply to this topic and thank you for trying to take into account this resolution in your developments.
Of course, you may also make use, it is my pleasure to test your beta applications and to return you feed-back about them !
For the latter point, it depends: do you want a maximum of community HTC uses your applications? So the answer is yes ....
Anyway, thank you for everything, cordially, JBS68

How to change the screen resolution ?

well.. this is the question.. my resolution is 480x234. somebody know how to change it for a 800x400 res? i seen many videos of youtube with this resolution and compared with my 480x234 is a BIG difference in quality...i think , and im sure its possible.. ,
i seen in the internet a page (search in google for wincepatch) , the patch on this page changes the resolution driver for a 800x480 driver on ANY wince 5/6 device , the main problem with the patch is for the $ , the patch is not for free.....
the main "video driver" , calls a value on a registry key ([HKEY_LOCAL_MACHINE\System\GDI\Drivers]) ,there is a key called "maindisp" , here , it calls a ".dll" file , THIS dll file tells the resolution and other things... the question is , how i build a ddi.dll file with 800x480 resolution? , sory for the bad english , im argentinian.. good bye !
ok , y advanced some , searching all the internet and is no way to get a "ddi.dll" disp driver from the internet... ,
i think its possible to upload mi ddi.dll with the 480x234 resolution, with yours help, modify it with a hex editor to a 800x480 resolution.. what do you think?
Someone can correct me if I am wrong but I don't believe what you are asking is possible. The screen on your phone can only display 480*234 because the screen itself only has the hardware capabilities to display that resolution (or possibly lower). It's like taking an old CRT tube tv, and then trying to play a 1080p video on it. The TV simply does not have the hardware technology to display the 1920x1080 picture, but rather can only display a resolution of 640x480. I believe it is that same case for your phone, your simply can't make the screen hardware display something it is incapable of. Again though I may be incorrect and anyone with more knowledge on this is subject would be appreciated to comment.
zoomonkey90 said:
Someone can correct me if I am wrong but I don't believe what you are asking is possible. The screen on your phone can only display 480*234 because the screen itself only has the hardware capabilities to display that resolution (or possibly lower). It's like taking an old CRT tube tv, and then trying to play a 1080p video on it. The TV simply does not have the hardware technology to display the 1920x1080 picture, but rather can only display a resolution of 640x480. I believe it is that same case for your phone, your simply can't make the screen hardware display something it is incapable of. Again though I may be incorrect and anyone with more knowledge on this is subject would be appreciated to comment.
Click to expand...
Click to collapse
sure! , you are correct. sory for my bad english , here is my question :
>The screen in windows is set to 320x240 and it stretches on the 480x234 display...
Finding the way to change resolution in core would allow to set a better solution (perhaps 400 or so pixels) and could solve both problems (display not sync or looking bad in my case).
According to http://forum.xda-developers.com/showthread.php?t=379728 there's a way to change the resolution. Perhaps there's a way in win core too.
Ideas?
lukz93 said:
According to http://forum.xda-developers.com/showthread.php?t=379728 there's a way to change the resolution. Perhaps there's a way in win core too.
Ideas?
Click to expand...
Click to collapse
Windows CE based devices are designed to support only a single video mode. For example, the Medion PNA I own has a display which is 480 pixel wide and 272 pixels high. Whatever the size, this is the physical resolution of the device. It is generally determined by the actual number of individual pixels elements that make up the display hardware and video chip that control the display. YOU CAN'T CHANGE THIS PER SOFTWARE!
BTW: Why not simply try out Nyditot Virtual Display ("NVD") you pointed to, which is trial ware, means you can testwisely install and use it for 7 days? Be aware, not all software applications written for the various Windows CE platforms are “resolution aware”. That is, they assume a standard resolution (e.g. 240x320 on Pocket PC) and therefore do not alter their layout based on NVD’s virtual width and height settings. NVD can't control the behavior of these applications! Even the Windows CE desktop (explorer) can't be changed with NVD.
reading , again reading and acquiring knowledge i learn this :
-The screen in windows is set to 320x240 and it stretches on the 480x234 display...
now , i take apart the resolution-change proble, and go for the new problem jaja, im stucked in sysupdater .. the problem? the touch screen doesn't work , and i can't press any button on this window...i'm thinking the unique solution is weld the usb port for the wince board , exactly as petrutms explained... , with that port attach a keyboard and w/ the tab key move between fields...
First of all you must say which device you have.
If your device has a 320x240 display, or a 400x320 or a 600x400, etc., you'll not be able to change it to a bigger size. You're limited by drivers, yes, but also by phisycal parameters. In other words, if you are capable to build a device using the screen of the HD2 and putting it in a Herald, and get it to work, probably you'll be capable to change or create the drivers.
On the other side, I've been using some 400x320 apps into my 320x240 display, and this means some parts of the app image (when it runs and does not crash because of display resolution) remain "out" of the screen and I can't scroll them. If this is what you mean when writing about those drivers...
And by opposite, apps made for smaller screens appear as a small part rendered in a black screen. Then, probably they can be stretched using some sort of apps or drivers, but this means you'll see blurred images, as they are zoomed like when you're displaying images 200% in your photoshop.
there is a program to change the resoloution.
not sure if it will work for what you need it to do but if i can find it ill upload it for you to try.

[Q] Screen View - Java ADT Eclipse

Hello, I am developing my very first app using the latest Android bundle (SDK + Eclipse included). I also installed LibGDx since it will be a game. Upon following some tutorials online it dawned on me, how the hell can I SEE what I'm doing? Meaning I have no room/screen view. So when I render an object onto the screen I just have to wing it when it comes to where it should start on the screen. This is obviously not a good way to make games, its kinda tedious. Precise placement of objects as in "Angry Birds" will be very hard. I'm well aware of emulation but that only shows things after the fact. There has to be a way to do it, maybe a plugin or something? Being able to drag/drop and interact with objects on this screen w/out code would also help a lot. Much thanks!
Eclipse shows the layouts at runtime. You don't have to run it on the emulator each time to manage layouts. Double click on the layout file and it will open in a side view. At the bottom, there will be 2 options, viz Layout.xml and Graphical Layout. Choose Graphical Layout.
EatHeat said:
Eclipse shows the layouts at runtime. You don't have to run it on the emulator each time to manage layouts. Double click on the layout file and it will open in a side view. At the bottom, there will be 2 options, viz Layout.xml and Graphical Layout. Choose Graphical Layout.
Click to expand...
Click to collapse
Thanks for replying, but I should've mentioned that I'm aware of this. This view only shows things I drag and drop onto from the same window. It doesn't show anything rendered in the code from other classes. So anything important like the main characters aren't there. Is there perhaps some way to make them show up in here?
Android3000 said:
Thanks for replying, but I should've mentioned that I'm aware of this. This view only shows things I drag and drop onto from the same window. It doesn't show anything rendered in the code from other classes. So anything important like the main characters aren't there. Is there perhaps some way to make them show up in here?
Click to expand...
Click to collapse
Layouts managed by code isn't showed. Only the xml layouts are show up.
EatHeat said:
Layouts managed by code isn't showed. Only the xml layouts are show up.
Click to expand...
Click to collapse
This is what bothers me. How in the world am I suppose to develop complex levels and what not without being able to see placement of things live? I can't imagine trying to make angry birds or something like that by only having coordinates and no visuals. So there isn't any add-on or plugin that can provide such capabilities?
There isn't any official visual level editor by LibGDX.
But maybe you find an Editor that saves your level in xml or sth. and you can parse that xml in ur LibGDX-App. I wrote my own Level-Editor specially for my LibGDX-Game and it wasn't so hard to code.
Regards
Android3000 said:
This is what bothers me. How in the world am I suppose to develop complex levels and what not without being able to see placement of things live? I can't imagine trying to make angry birds or something like that by only having coordinates and no visuals. So there isn't any add-on or plugin that can provide such capabilities?
Click to expand...
Click to collapse
Not that I know of. You can just create the whole layout in xml to get it correct first. Then use those coordinates in your code accordingly.
Apparently various types of 3rd party apps do exist for this task . Thanks for the help guys.
just try another game engine

Categories

Resources