mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-06-21 13:22:40 +02:00
OpenGL examples: make eglChooseConfig attribute list forwards-compatible
This commit is contained in:
parent
4c836fd796
commit
f97ccaa9e0
@ -102,9 +102,13 @@ static bool initEgl()
|
|||||||
EGLint numConfigs;
|
EGLint numConfigs;
|
||||||
static const EGLint framebufferAttributeList[] =
|
static const EGLint framebufferAttributeList[] =
|
||||||
{
|
{
|
||||||
EGL_RED_SIZE, 1,
|
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||||
EGL_GREEN_SIZE, 1,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_BLUE_SIZE, 1,
|
EGL_GREEN_SIZE, 8,
|
||||||
|
EGL_BLUE_SIZE, 8,
|
||||||
|
EGL_ALPHA_SIZE, 8,
|
||||||
|
EGL_DEPTH_SIZE, 24,
|
||||||
|
EGL_STENCIL_SIZE, 8,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
||||||
|
@ -123,9 +123,12 @@ static bool initEgl()
|
|||||||
EGLint numConfigs;
|
EGLint numConfigs;
|
||||||
static const EGLint framebufferAttributeList[] =
|
static const EGLint framebufferAttributeList[] =
|
||||||
{
|
{
|
||||||
EGL_RED_SIZE, 1,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_GREEN_SIZE, 1,
|
EGL_GREEN_SIZE, 8,
|
||||||
EGL_BLUE_SIZE, 1,
|
EGL_BLUE_SIZE, 8,
|
||||||
|
EGL_ALPHA_SIZE, 8,
|
||||||
|
EGL_DEPTH_SIZE, 24,
|
||||||
|
EGL_STENCIL_SIZE, 8,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
||||||
|
@ -389,9 +389,11 @@ bool GpuConsole::initEgl()
|
|||||||
EGLint numConfigs;
|
EGLint numConfigs;
|
||||||
static const EGLint framebufferAttributeList[] =
|
static const EGLint framebufferAttributeList[] =
|
||||||
{
|
{
|
||||||
EGL_RED_SIZE, 1,
|
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||||
EGL_GREEN_SIZE, 1,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_BLUE_SIZE, 1,
|
EGL_GREEN_SIZE, 8,
|
||||||
|
EGL_BLUE_SIZE, 8,
|
||||||
|
EGL_ALPHA_SIZE, 8,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
||||||
|
@ -99,9 +99,13 @@ static bool initEgl()
|
|||||||
EGLint numConfigs;
|
EGLint numConfigs;
|
||||||
static const EGLint framebufferAttributeList[] =
|
static const EGLint framebufferAttributeList[] =
|
||||||
{
|
{
|
||||||
EGL_RED_SIZE, 1,
|
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||||
EGL_GREEN_SIZE, 1,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_BLUE_SIZE, 1,
|
EGL_GREEN_SIZE, 8,
|
||||||
|
EGL_BLUE_SIZE, 8,
|
||||||
|
EGL_ALPHA_SIZE, 8,
|
||||||
|
EGL_DEPTH_SIZE, 24,
|
||||||
|
EGL_STENCIL_SIZE, 8,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
||||||
|
@ -86,9 +86,13 @@ static bool initEgl()
|
|||||||
EGLint numConfigs;
|
EGLint numConfigs;
|
||||||
static const EGLint framebufferAttributeList[] =
|
static const EGLint framebufferAttributeList[] =
|
||||||
{
|
{
|
||||||
EGL_RED_SIZE, 1,
|
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||||
EGL_GREEN_SIZE, 1,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_BLUE_SIZE, 1,
|
EGL_GREEN_SIZE, 8,
|
||||||
|
EGL_BLUE_SIZE, 8,
|
||||||
|
EGL_ALPHA_SIZE, 8,
|
||||||
|
EGL_DEPTH_SIZE, 24,
|
||||||
|
EGL_STENCIL_SIZE, 8,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
||||||
|
@ -99,9 +99,13 @@ static bool initEgl()
|
|||||||
EGLint numConfigs;
|
EGLint numConfigs;
|
||||||
static const EGLint framebufferAttributeList[] =
|
static const EGLint framebufferAttributeList[] =
|
||||||
{
|
{
|
||||||
EGL_RED_SIZE, 1,
|
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||||
EGL_GREEN_SIZE, 1,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_BLUE_SIZE, 1,
|
EGL_GREEN_SIZE, 8,
|
||||||
|
EGL_BLUE_SIZE, 8,
|
||||||
|
EGL_ALPHA_SIZE, 8,
|
||||||
|
EGL_DEPTH_SIZE, 24,
|
||||||
|
EGL_STENCIL_SIZE, 8,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
eglChooseConfig(s_display, framebufferAttributeList, &config, 1, &numConfigs);
|
||||||
|
Loading…
Reference in New Issue
Block a user