本文整理汇总了C++中Display::createPbufferSurface方法的典型用法代码示例。如果您正苦于以下问题:C++ Display::createPbufferSurface方法的具体用法?C++ Display::createPbufferSurface怎么用?C++ Display::createPbufferSurface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::createPbufferSurface方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreatePbufferSurface
EGLSurface EGLAPIENTRY CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
{
EVENT("(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, const EGLint *attrib_list = 0x%0.8p)",
dpy, config, attrib_list);
Display *display = static_cast<Display*>(dpy);
Config *configuration = static_cast<Config*>(config);
AttributeMap attributes(attrib_list);
Error error = ValidateCreatePbufferSurface(display, configuration, attributes);
if (error.isError())
{
SetGlobalError(error);
return EGL_NO_SURFACE;
}
egl::Surface *surface = nullptr;
error = display->createPbufferSurface(configuration, attributes, &surface);
if (error.isError())
{
SetGlobalError(error);
return EGL_NO_SURFACE;
}
return static_cast<EGLSurface>(surface);
}
示例2: CreatePbufferSurface
EGLSurface EGLAPIENTRY CreatePbufferSurface(EGLDisplay dpy,
EGLConfig config,
const EGLint *attrib_list)
{
EVENT(
"(EGLDisplay dpy = 0x%0.8p, EGLConfig config = 0x%0.8p, const EGLint *attrib_list = "
"0x%0.8p)",
dpy, config, attrib_list);
Thread *thread = GetCurrentThread();
Display *display = static_cast<Display *>(dpy);
Config *configuration = static_cast<Config *>(config);
AttributeMap attributes = AttributeMap::CreateFromIntArray(attrib_list);
Error error = ValidateCreatePbufferSurface(display, configuration, attributes);
if (error.isError())
{
thread->setError(error);
return EGL_NO_SURFACE;
}
egl::Surface *surface = nullptr;
error = display->createPbufferSurface(configuration, attributes, &surface);
if (error.isError())
{
thread->setError(error);
return EGL_NO_SURFACE;
}
return static_cast<EGLSurface>(surface);
}