figofuture / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Background of Non-Native Resolution Significantly Lowers FPS (Frames Per Second) #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take the Hello World demo from 
http://rokonandroid.com/tutorials/41-beginner/62-hello-world
2. Replace textures/background.png with a 240x160 background (instead of the 
initial 480x320 background).  In a separate test not using the Hello World 
program, the same bug would appear with a higher-resolution background.
3. Run logcat (adb logcat)
4. Start Hello World on the device being monitored via logcat (an actual 
device, not the emulator).

What is the expected output?
FPS reports between 30 and 60, usually over 45.  This is what is seen with the 
480x320 background.

What do you see instead?
FPS reports of around 3 or 4.

What version of Rokon are you using?
2.0.3

On which version of Android are you experiencing this?
1.6, G1 device.

Please provide any additional information below.
This may also apply to Sprites, but that's more manageable.  For my purposes I 
really just need a solid-color background, which is why I initially used a very 
small background.

Original issue reported on code.google.com by aoc...@gmail.com on 4 Aug 2010 at 2:52

GoogleCodeExporter commented 9 years ago
If you just want a solid-color background, don't use an image, use this instead:
setClearColour(R, G, B, 1);

RGB should be somewhere between 0 and 1.

Original comment by anton.he...@gmail.com on 4 Aug 2010 at 12:56

GoogleCodeExporter commented 9 years ago
So what you're saying is, on your 2 year old phone, you get an FPS drop when 
scaling textures up?

Well spotted! :)

This is partly to do with the scaling types (linear vs nearest neighbour)

I'll work something out to make it optional

Original comment by rtaylor205@gmail.com on 8 Aug 2010 at 5:22

GoogleCodeExporter commented 9 years ago

Original comment by rtaylor205@gmail.com on 8 Aug 2010 at 5:24