| Summary: | iPod touch 2nd gen crash due missing opengles2 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | IvanG <ivang> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | iPhone/iPod touch | ||
| OS: | iOS (All) | ||
Fixed, thanks! http://hg.libsdl.org/SDL/rev/a83eb92704f3 |
Crash happens on iPodTouch 2nd generation (os version 4.2.1) when SDL_SetVideoMode() is called (only flag set was SDL_HWSURFACE) crash happens in: SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window) in SDL_uikitopengles.m gets called trying to create "opengles2" renderer. /* construct our view, passing in SDL's OpenGL configuration data */ view = [[SDL_uikitopenglview alloc] initWithFrame: [uiwindow bounds] \ retainBacking: _this->gl_config.retained_backing \ rBits: _this->gl_config.red_size \ gBits: _this->gl_config.green_size \ bBits: _this->gl_config.blue_size \ aBits: _this->gl_config.alpha_size \ depthBits: _this->gl_config.depth_size \ majorVersion: _this->gl_config.major_version]; // above call returns NULL data->view = view; // crash happens on next line because view is NULL: view->viewcontroller = data->viewcontroller; if (view->viewcontroller != nil) { [view->viewcontroller setView:view]; [view->viewcontroller retain]; } As workaround I'm using SDL_SetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION, "opengles"); prior to SDL_SetVideoMode() call