diff options
| author | suyambulingamrm <suyambu.rm@samsung.com> | 2014-06-17 19:19:08 +0530 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-06-17 18:14:40 -0700 |
| commit | bf441088356830159b7a1fa9ca7ee1f00688e43d (patch) | |
| tree | 42fc4cd1c4050fe91323e9550612ff31cc536c12 /src/egl.cpp | |
| parent | 5117b5c9c4b49ac7bb95e8f19781946ad5f4e6c5 (diff) | |
Issue #87. Add new EGL command line config options.
Diffstat (limited to 'src/egl.cpp')
| -rw-r--r-- | src/egl.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/egl.cpp b/src/egl.cpp index 1f577eb..2a78e05 100644 --- a/src/egl.cpp +++ b/src/egl.cpp @@ -20,7 +20,6 @@ #include "egl.h" #include "device_config.h" - bool createEGLContextAndWindow(egl_state_t *state, const device_config_t& device_config) { @@ -34,6 +33,11 @@ createEGLContextAndWindow(egl_state_t *state, const device_config_t& device_conf EGL_STENCIL_SIZE, 1, EGL_SAMPLES, 0, EGL_SAMPLE_BUFFERS, 0, + EGL_DEPTH_SIZE, 0, + EGL_LUMINANCE_SIZE, 0, + EGL_MIN_SWAP_INTERVAL, EGL_DONT_CARE, + EGL_MAX_SWAP_INTERVAL, EGL_DONT_CARE, + EGL_MATCH_NATIVE_PIXMAP, EGL_NONE, EGL_NONE }; EGLint ctx_attr[] = { @@ -46,7 +50,7 @@ createEGLContextAndWindow(egl_state_t *state, const device_config_t& device_conf // TODO: Hack // User configuration settings - for (int i=0; i<18; i+=2) { + for (int i=0; i<28; i+=2) { switch (attr[i]) { case EGL_SAMPLES: attr[i+1] = device_config.egl_samples; @@ -54,6 +58,21 @@ createEGLContextAndWindow(egl_state_t *state, const device_config_t& device_conf case EGL_SAMPLE_BUFFERS: attr[i+1] = device_config.egl_sample_buffers; break; + case EGL_DEPTH_SIZE: + attr[i+1] = device_config.egl_depth_size; + break; + case EGL_LUMINANCE_SIZE: + attr[i+1] = device_config.egl_luminance_size; + break; + case EGL_MIN_SWAP_INTERVAL: + attr[i+1] = device_config.egl_min_swap_interval; + break; + case EGL_MAX_SWAP_INTERVAL: + attr[i+1] = device_config.egl_max_swap_interval; + break; + case EGL_MATCH_NATIVE_PIXMAP: + attr[i+1] = device_config.egl_match_native_pixmap; + break; } } |