Remove useless code
This commit is contained in:
parent
951642ecb4
commit
3082620ef9
|
|
@ -8,39 +8,6 @@
|
||||||
|
|
||||||
namespace Nz::GL
|
namespace Nz::GL
|
||||||
{
|
{
|
||||||
bool EGLContextX11::Create(const ContextParams& params, const EGLContextBase* shareContext)
|
|
||||||
{
|
|
||||||
Destroy(); //< In case a previous display or surface hasn't been released
|
|
||||||
|
|
||||||
m_params = params;
|
|
||||||
|
|
||||||
if (!BindAPI())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
m_display = m_loader.GetDefaultDisplay();
|
|
||||||
|
|
||||||
std::size_t configCount;
|
|
||||||
std::array<EGLConfig, 0xFF> configs;
|
|
||||||
if (!ChooseConfig(configs.data(), configs.size(), &configCount))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
EGLint surfaceAttributes[] = {
|
|
||||||
EGL_WIDTH, 1,
|
|
||||||
EGL_HEIGHT, 1,
|
|
||||||
EGL_NONE
|
|
||||||
};
|
|
||||||
|
|
||||||
std::size_t configIndex = 0;
|
|
||||||
for (; configIndex < configCount; ++configIndex)
|
|
||||||
{
|
|
||||||
m_surface = m_loader.eglCreatePbufferSurface(m_display, configs[configIndex], surfaceAttributes);
|
|
||||||
if (m_surface)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return CreateInternal(configs[configIndex], shareContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EGLContextX11::Create(const ContextParams& params, WindowHandle window, const EGLContextBase* shareContext)
|
bool EGLContextX11::Create(const ContextParams& params, WindowHandle window, const EGLContextBase* shareContext)
|
||||||
{
|
{
|
||||||
assert(window.type == WindowManager::X11);
|
assert(window.type == WindowManager::X11);
|
||||||
|
|
@ -59,16 +26,12 @@ namespace Nz::GL
|
||||||
if (!ChooseConfig(configs.data(), configs.size(), &configCount))
|
if (!ChooseConfig(configs.data(), configs.size(), &configCount))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
EGLint surfaceAttributes[] = {
|
|
||||||
EGL_NONE
|
|
||||||
};
|
|
||||||
|
|
||||||
::Window winHandle = static_cast<::Window>(window.x11.window);
|
::Window winHandle = static_cast<::Window>(window.x11.window);
|
||||||
|
|
||||||
std::size_t configIndex = 0;
|
std::size_t configIndex = 0;
|
||||||
for (; configIndex < configCount; ++configIndex)
|
for (; configIndex < configCount; ++configIndex)
|
||||||
{
|
{
|
||||||
m_surface = m_loader.eglCreateWindowSurface(m_display, configs[configIndex], winHandle, surfaceAttributes);
|
m_surface = m_loader.eglCreateWindowSurface(m_display, configs[configIndex], winHandle, nullptr);
|
||||||
if (m_surface)
|
if (m_surface)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue