| Summary: | Android: no Non-GLES contexts/surfaces work | ||
|---|---|---|---|
| Product: | SDL | Reporter: | paines <anes.lihovac> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | gabomdq, tim |
| Version: | HG 2.0 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
|
Description
paines
2011-07-03 12:28:56 UTC
It seems to me that testsprite.c uses SDL's 1.2 API, which AFAIK doesn't quite work under Android. I can tell you for sure that non GL ES surface do work with SDL 1.3, I use them via SDL_image to load images and then copy them to a texture with http://wiki.libsdl.org/moin.cgi/SDL_CreateTextureFromSurface . Gabriel, thanks for commenting. After your comment I started to look into this again, and realized that my app was failing because of SDL_RWops being unable to read from /sdcard. This is now fixed. However I still have visual issues. I simply don't see a thing on the screen ! Return codes for SDL_SetVideoMode (surface is != null) and blitting and flip/update are okay (return code 0). Also a simple SDL_FillRect with e.g. red and updating the whole rect doesn't show anything. Screen stays black. I can't say what your problem is, but a quick glance over the SDL_compat.c code (which is what you are probably using, and is known to be buggy) seems to indicate that there's no ready made way to go from the surface you obtain from SDL_SetVideoMode to the screen. I would suggest creating a renderer, converting your surfaces to textures and using SDL_RenderCopy to show them. Okay, I will try that. Thanks Gabriel Just one more info: 2 Hardware devices fail (Xperia Play, Desire HD2) while Emulator works like a charme. Any luck using the render API? I managed to get it running by disabling GLES 2.0 via #define SDL_VIDEO_RENDER_OGL_ES2 0 in SDL/include/SDL_config_android.h To be honest, I tried the render api, but I cannot remember if it worked any good. You can close the ticket now, if you like. Thanks and BR |