34 Commits

Author SHA1 Message Date
Max Horn
a50c36d138 ANDROID: Fix various forbidden symbol clashes 2011-05-03 14:29:01 +02:00
Johannes Schickel
da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel
877004dbdd BACKENDS: Adapt various backends code to set up Surface::format correctly.
Note that this change is not tested at all (not even compile wise!).
2011-04-17 21:14:19 +02:00
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
b4a6c89662 ANDROID: Always set the surface properties
Didn't happen on the shortcut, which led to wrong properties and
surface functions scribbling over memory
2011-03-25 00:41:01 +01:00
dhewg
19c407ca69 ANDROID: Fix texture double release 2011-03-24 22:04:03 +01:00
dhewg
397fd31a17 ANDROID: Cleanup 2011-03-24 18:56:54 +01:00
dhewg
f706b1568d ANDROID: Cleanup
Removed not required checks since we now buffer texture contents
2011-03-14 20:10:41 +01:00
dhewg
6389e70e45 ANDROID: Remove clearBuffer()
Not required. Why did i add that again?
2011-03-14 19:35:36 +01:00
dhewg
5b94159f40 ANDROID: Clear fake palette after allocating
Gets rid of funky gfx artifacts on the overlay
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
fa51d82639 ANDROID: Prevent unnecessary reallocs 2011-03-13 16:50:48 +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
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
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
83b00526d0 ANDROID: Reduce mem usage of fillBuffer() 2011-03-05 11:00:36 +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
f639466ab2 ANDROID: Cleanup 2011-03-04 21:36:48 +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
1e3c96b3ef ANDROID: Formatting/whitespaces 2011-03-03 20:46:49 +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
867fa2696d ANDROID: Let's not do that on the stack 2011-02-24 23:18:33 +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