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


C++ vogl_context_info::is_valid方法代码示例

本文整理汇总了C++中vogl_context_info::is_valid方法的典型用法代码示例。如果您正苦于以下问题:C++ vogl_context_info::is_valid方法的具体用法?C++ vogl_context_info::is_valid怎么用?C++ vogl_context_info::is_valid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vogl_context_info的用法示例。


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

示例1:

vogleditor_stateTreeContextInfoItem::vogleditor_stateTreeContextInfoItem(QString name, QString value, vogleditor_stateTreeItem* parent, const vogl_context_info& info)
    : vogleditor_stateTreeItem(name, value, parent),
      m_pState(&info),
      m_pDiffBaseState(NULL)
{
    QString tmp;

    if (info.is_valid())
    {
       tmp = "valid";
    }
    else
    {
       tmp = "Never made current";
    }

    this->setValue(tmp);

    if (info.is_valid())
    {
        { vogleditor_stateTreeContextInfoBoolItem* pItem = new vogleditor_stateTreeContextInfoBoolItem("Forward compatible", &vogl_context_info::is_forward_compatible, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoBoolItem* pItem = new vogleditor_stateTreeContextInfoBoolItem("Core profile", &vogl_context_info::is_core_profile, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoBoolItem* pItem = new vogleditor_stateTreeContextInfoBoolItem("Compatibility Profile", &vogl_context_info::is_compatibility_profile, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoBoolItem* pItem = new vogleditor_stateTreeContextInfoBoolItem("Debug context", &vogl_context_info::is_debug_context, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }

        { vogleditor_stateTreeContextInfoStringItem* pItem = new vogleditor_stateTreeContextInfoStringItem("GL_RENDERER", &vogl_context_info::get_renderer_str, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoStringItem* pItem = new vogleditor_stateTreeContextInfoStringItem("GL_VENDOR", &vogl_context_info::get_vendor_str, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoStringItem* pItem = new vogleditor_stateTreeContextInfoStringItem("GL_VERSION", &vogl_context_info::get_version_str, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoStringItem* pItem = new vogleditor_stateTreeContextInfoStringItem("GL_SHADING_LANGUAGE_VERSION", &vogl_context_info::get_glsl_version_str, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }

        vogleditor_stateTreeItem* pExtNode = new vogleditor_stateTreeItem("GL_EXTENSIONS", "", this);
        this->appendChild(pExtNode);
        const dynamic_string_array& extList = info.get_extensions();
        for (uint e = 0; e < extList.size(); e++)
        {
            vogleditor_stateTreeContextInfoExtensionItem* pItem = new vogleditor_stateTreeContextInfoExtensionItem(tmp.sprintf("%d", e), extList[e].c_str(), pExtNode, info);
            m_diffableItems.push_back(pItem);
            pExtNode->appendChild(pItem);
        }
        pExtNode->setValue(tmp.sprintf("[%d]", pExtNode->childCount()));

        { vogleditor_stateTreeContextInfoUIntItem* pItem = new vogleditor_stateTreeContextInfoUIntItem("GL_MAX_PROGRAM_ENV_PARAMETERS_ARB GL_VERTEX_PROGRAM_ARB", &vogl_context_info::get_max_arb_vertex_program_env_params, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoUIntItem* pItem = new vogleditor_stateTreeContextInfoUIntItem("GL_MAX_PROGRAM_ENV_PARAMETERS_ARB GL_FRAGMENT_PROGRAM_ARB", &vogl_context_info::get_max_arb_fragment_program_env_params, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoUIntItem* pItem = new vogleditor_stateTreeContextInfoUIntItem("GL_MAX_PROGRAM_MATRICES_ARB", &vogl_context_info::get_max_arb_program_matrices, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoUIntItem* pItem = new vogleditor_stateTreeContextInfoUIntItem("GL_MAX_COMBINED_TEXTURE_COORDS", &vogl_context_info::get_max_combined_texture_coords, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }
        { vogleditor_stateTreeContextInfoUIntItem* pItem = new vogleditor_stateTreeContextInfoUIntItem("GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", &vogl_context_info::get_max_transform_feedback_separate_attribs, this, info); m_diffableItems.push_back(pItem); this->appendChild(pItem); }


//       this->appendChild(new vogleditor_stateTreeItem("GL_MAX_DRAW_BUFFERS", STR_INT(info.get_max_draw_buffers()), this));
//       this->appendChild(new vogleditor_stateTreeItem("GL_MAX_LIGHTS", STR_INT(info.get_max_lights()), this));
//       this->appendChild(new vogleditor_stateTreeItem("GL_MAX_TEXTURE_COORDS", STR_INT(info.get_max_texture_coords()), this));
//       this->appendChild(new vogleditor_stateTreeItem("GL_MAX_TEXTURE_IMAGE_UNITS", STR_INT(info.get_max_texture_image_units()), this));
//       this->appendChild(new vogleditor_stateTreeItem("GL_MAX_TEXTURE_UNITS", STR_INT(info.get_max_texture_units()), this));
//       this->appendChild(new vogleditor_stateTreeItem("GL_MAX_UNIFORM_BUFFER_BINDINGS", STR_INT(info.get_max_uniform_buffer_bindings()), this));
//       this->appendChild(new vogleditor_stateTreeItem("GL_MAX_VERTEX_ATTRIBS", STR_INT(info.get_max_vertex_attribs()), this));
    }
}
开发者ID:CSRedRat,项目名称:vogl,代码行数:57,代码来源:vogleditor_statetreecontextinfoitem.cpp


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