25 Commits

Author SHA1 Message Date
dhewg
4440aa4310 ANDROID: Remove code for paletted textures
Unused now, because the performance isn't good enough on weak GLES
drivers.
2011-04-05 15:09:46 +02:00
dhewg
ea253ff26d ANDROID: Use a faked paletted texture for CLUT cursors
Same change as for the game screen, reduces CPU usage a little
2011-04-05 15:07:07 +02:00
dhewg
f4fd9e8b50 ANDROID: Fix cursor visibility 2011-03-17 19:35:58 +01:00
dhewg
e71c2cf850 ANDROID: Constify getDrawRect() 2011-03-16 20:54:25 +01:00
dhewg
6389e70e45 ANDROID: Remove clearBuffer()
Not required. Why did i add that again?
2011-03-14 19:35:36 +01:00
dhewg
df9167c6b3 ANDROID: Add graphics mode for linear filtering 2011-03-13 23:30:17 +01:00
dhewg
c63c2a9e59 ANDROID: Fix texture clear color 2011-03-13 23:30:17 +01:00
dhewg
4267011e3a ANDROID: Some texture convinience functions 2011-03-13 23:30:15 +01:00
dhewg
2721e287e5 ANDROID: Buffer 16bit texture contents
Same issue as in the last commit: glTexSubImage2D is slow, so cache
all copyRect*() calls in a buffer, and update the dirty rect once
when drawing. Reduces CPU usage on 16bit games significantly.
Also, lockScreen() returns now pixel data for non-CLUT8 games instead
of asserting.
2011-03-13 16:50:47 +01:00
dhewg
a93229cae5 ANDROID: Don't use compressed textures for the game screen
Some GLES drivers suck so much that uploading data to the GPU takes
ages. CLUT8 games now use a faked paletted texture, which internally
uses a RGB565 hardware texture (Android's native pixel format).
This seems to be the only way to efficiently implement constant
changing textures with GLES1 - at the cost of extra buffers.
Then again, we can now use glTexSubImage2D to only update the dirty
rects, which wasn't possible before because glCompressedTexSubImage2D
is only usable on GLES2. This commit does exactly that.
Overall, the CPU usage is massively reduced for CLUT8 games.
2011-03-13 16:50:43 +01:00
dhewg
2259f922f8 ANDROID: Remove redundant variable 2011-03-12 09:36:22 +01:00
dhewg
7fe487f9cc ANDROID: Add more paletted texture types 2011-03-12 09:36:22 +01:00
dhewg
99c0d82541 ANDROID: Cleanup paletted textures 2011-03-12 09:36:22 +01:00
dhewg
4afa2c62b9 ANDROID: Get rid of ugly casts 2011-03-12 09:36:22 +01:00
dhewg
42c6a785c7 ANDROID: Texture cleanup 2011-03-07 19:56:29 +01:00
dhewg
433429dcf4 ANDROID: Fix warning 2011-03-05 23:56:25 +01:00
dhewg
12fb817751 ANDROID: Fix 16bit cursors
I hate this code
2011-03-05 23:08:42 +01:00
dhewg
53ee7c5513 ANDROID: Proper fillBuffer() for non CLUT8 colors 2011-03-05 23:08:41 +01:00
dhewg
94db3403a3 ANDROID: Add initial 16bit gfx support
Supported pixel formats: 565, 5551, 4444
Missing: 555 (doesn't exist on GLES)
2011-03-05 18:47:05 +01:00
dhewg
4ee0a9f43a ANDROID: Merge updateTexture() 2011-03-05 11:00:36 +01:00
dhewg
68378150be ANDROID: Remove some vtable overhead on textures 2011-03-05 11:00:36 +01:00
dhewg
ce9796baa3 ANDROID: Don't wipe paletted textures on reinit
The content of a paletted texture is in _surface.pixels. When recreating
the surface, don't wipe its data unnecessarily. This fixes gfx garbage
on CLUT8 games/cursors when leaving and going back to ScummVM
2011-03-03 21:29:47 +01:00
dhewg
2d4a64d184 ANDROID: Properly release texture resources
When calling glDeleteTextures() we need a valid surface.
2011-03-02 23:18:36 +01:00
dhewg
bd7e3e9bb2 ANDROID: cleanup 2011-03-02 23:18:34 +01:00
dhewg
257913676d ANDROID: Split code into multiple files
And get rid of unnecessary JNI calls to get a pointer to g_system
2011-02-24 23:18:31 +01:00