Fixed bug 1616 - SDL does not use values set with SDL_GL_SetAttribute on Android
Philipp Wiesemann 2012-10-06 07:19:57 PDT SDL does not use values set with SDL_GL_SetAttribute on Android. I attached a patch which adds this functionality and makes it possible to set (for example) depth buffer size or anti-aliasing in the actual application instead of modifying the Java source (which seems currently the only way).
This commit is contained in:
parent
69c062e757
commit
b1185a32e3
4 changed files with 48 additions and 27 deletions
|
@ -74,7 +74,16 @@ SDL_GLContext
|
|||
Android_GL_CreateContext(_THIS, SDL_Window * window)
|
||||
{
|
||||
if (!Android_JNI_CreateContext(_this->gl_config.major_version,
|
||||
_this->gl_config.minor_version)) {
|
||||
_this->gl_config.minor_version,
|
||||
_this->gl_config.red_size,
|
||||
_this->gl_config.green_size,
|
||||
_this->gl_config.blue_size,
|
||||
_this->gl_config.alpha_size,
|
||||
_this->gl_config.buffer_size,
|
||||
_this->gl_config.depth_size,
|
||||
_this->gl_config.stencil_size,
|
||||
_this->gl_config.multisamplebuffers,
|
||||
_this->gl_config.multisamplesamples)) {
|
||||
SDL_SetError("Couldn't create OpenGL context - see Android log for details");
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue