本文整理汇总了C++中Display::getConfigs方法的典型用法代码示例。如果您正苦于以下问题:C++ Display::getConfigs方法的具体用法?C++ Display::getConfigs怎么用?C++ Display::getConfigs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::getConfigs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ChooseConfig
EGLBoolean EGLAPIENTRY ChooseConfig(EGLDisplay dpy,
const EGLint *attrib_list,
EGLConfig *configs,
EGLint config_size,
EGLint *num_config)
{
EVENT(
"(EGLDisplay dpy = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p, "
"EGLConfig *configs = 0x%0.8p, EGLint config_size = %d, EGLint *num_config = 0x%0.8p)",
dpy, attrib_list, configs, config_size, num_config);
Thread *thread = GetCurrentThread();
Display *display = static_cast<Display *>(dpy);
AttributeMap attribMap = AttributeMap::CreateFromIntArray(attrib_list);
Error error = ValidateChooseConfig(display, attribMap, config_size, num_config);
if (error.isError())
{
thread->setError(error);
return EGL_FALSE;
}
ClipConfigs(display->getConfigs(attribMap), configs, config_size, num_config);
thread->setError(NoError());
return EGL_TRUE;
}
示例2: ChooseConfig
EGLBoolean EGLAPIENTRY ChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
{
EVENT("(EGLDisplay dpy = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p, "
"EGLConfig *configs = 0x%0.8p, EGLint config_size = %d, EGLint *num_config = 0x%0.8p)",
dpy, attrib_list, configs, config_size, num_config);
Display *display = static_cast<Display*>(dpy);
Error error = ValidateDisplay(display);
if (error.isError())
{
SetGlobalError(error);
return EGL_FALSE;
}
if (!num_config)
{
SetGlobalError(Error(EGL_BAD_PARAMETER));
return EGL_FALSE;
}
std::vector<const Config*> filteredConfigs = display->getConfigs(AttributeMap(attrib_list));
if (configs)
{
filteredConfigs.resize(std::min<size_t>(filteredConfigs.size(), config_size));
for (size_t i = 0; i < filteredConfigs.size(); i++)
{
configs[i] = const_cast<Config*>(filteredConfigs[i]);
}
}
*num_config = static_cast<EGLint>(filteredConfigs.size());
SetGlobalError(Error(EGL_SUCCESS));
return EGL_TRUE;
}
示例3: GetConfigs
EGLBoolean EGLAPIENTRY GetConfigs(EGLDisplay dpy,
EGLConfig *configs,
EGLint config_size,
EGLint *num_config)
{
EVENT(
"(EGLDisplay dpy = 0x%0.8p, EGLConfig *configs = 0x%0.8p, "
"EGLint config_size = %d, EGLint *num_config = 0x%0.8p)",
dpy, configs, config_size, num_config);
Thread *thread = GetCurrentThread();
Display *display = static_cast<Display *>(dpy);
Error error = ValidateGetConfigs(display, config_size, num_config);
if (error.isError())
{
thread->setError(error);
return EGL_FALSE;
}
ClipConfigs(display->getConfigs(AttributeMap()), configs, config_size, num_config);
thread->setError(NoError());
return EGL_TRUE;
}