当前位置: 首页>>代码示例>>C++>>正文


C++ GlContext类代码示例

本文整理汇总了C++中GlContext的典型用法代码示例。如果您正苦于以下问题:C++ GlContext类的具体用法?C++ GlContext怎么用?C++ GlContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GlContext类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ContextType

GlContext* GlContext::create()
{
    GlContext* context = new ContextType(sharedContext);
    context->initialize();

    return context;
}
开发者ID:SuitEmUp,项目名称:SuitEmUp,代码行数:7,代码来源:GlContext.cpp

示例2: ContextType

GlContext* GlContext::New()
{
    GlContext* context = new ContextType(sharedContext);
    context->Initialize();

    return context;
}
开发者ID:coolhome,项目名称:SFML,代码行数:7,代码来源:GlContext.cpp

示例3: assert

GlContext* GlContext::create(const ContextSettings& settings, unsigned int width, unsigned int height)
{
    // Make sure that there's an active context (context creation may need extensions, and thus a valid context)
    assert(sharedContext != NULL);

    Lock lock(mutex);

    GlContext* context = NULL;

    // We don't use acquireTransientContext here since we have
    // to ensure we have exclusive access to the shared context
    // in order to make sure it is not active during context creation
    {
        sharedContext->setActive(true);

        // Create the context
        context = new ContextType(sharedContext, settings, width, height);

        sharedContext->setActive(false);
    }

    context->initialize(settings);
    context->checkSettings(settings);

    return context;
}
开发者ID:bacsmar,项目名称:SFML,代码行数:26,代码来源:GlContext.cpp

示例4: lock

GlContext* GlContext::create()
{
    Lock lock(mutex);

    // Create the context
    GlContext* context = new ContextType(sharedContext);
    context->initialize();

    return context;
}
开发者ID:JackLinMaker,项目名称:SFML,代码行数:10,代码来源:GlContext.cpp

示例5: ensureContext

GlContext* GlContext::create(const ContextSettings& settings, unsigned int width, unsigned int height)
{
    // Make sure that there's an active context (context creation may need extensions, and thus a valid context)
    ensureContext();

    // Create the context
    GlContext* context = new ContextType(sharedContext, settings, width, height);
    context->initialize();

    return context;
}
开发者ID:SuitEmUp,项目名称:SuitEmUp,代码行数:11,代码来源:GlContext.cpp

示例6: LOG_ALL

void
OpenGl::flush() {

	LOG_ALL(opengllog) << "attempting to flush current context" << std::endl;

	GlContext* context = getInstance()->_context.get();

	if (context != 0)
		context->flush();
	else
		LOG_ALL(opengllog) << "there is no current context in this thread" << std::endl;
}
开发者ID:ongbe,项目名称:gui-1,代码行数:12,代码来源:OpenGl.cpp

示例7: shared

bool shared(GlContext& a, GlContext& b)
{
	std::lock_guard<std::mutex> lock(contextShareMutex());
	const auto& shared = a.shared();

	for(auto& c : shared) if(c == &b) return true;
	return false;
}
开发者ID:nyorain,项目名称:ny,代码行数:8,代码来源:gl.cpp


注:本文中的GlContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。