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


C++ seq::getData方法代码示例

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


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

示例1: compile

   /// Compile this shader.
   ///
   /// Will terminate program on failure.
   void compile() const
   {
#if defined(USE_LD)
     std::string pretty_source = this->str();
     const GLchar *pretty_source_c_str = pretty_source.c_str();
     dnload_glShaderSource(m_id, 1, &pretty_source_c_str, NULL);
#else
     dnload_glShaderSource(m_id, m_parts.size(), const_cast<const GLchar**>(m_parts.getData()), NULL);
#endif

     dnload_glCompileShader(m_id);

#if defined(USE_LD)
     std::string log = GlslShaderSource::get_shader_info_log(m_id);
     if(0 < log.length())
     {
       std::cout << GlslShaderSource::string_add_line_numbers(pretty_source) << std::endl;
       std::cout << log << std::endl;
     }

     if(!GlslShaderSource::get_shader_compile_status(m_id))
     {
       teardown();
       exit(1);
     }
#endif
   }
开发者ID:faemiyah,项目名称:faemiyah-demoscene_2016-08_80k-intro_my_mistress_the_leviathan,代码行数:30,代码来源:verbatim_shader.hpp

示例2: update

    /// Update this element buffer into the GPU.
    ///
    /// Empty data will not be updated.
    ///
    /// \param data Data to update.
    void update(const seq<uint16_t> &data) const
    {
      if(!data)
      {
        return;
      }

#if 0
      for(unsigned ii = 0; (ii < data.size()); ii += 3)
      {
        std::cout << data[ii] << ", " << data[ii + 1] << ", " << data[ii + 2] << std::endl;
      }
#endif

      bind();
      dnload_glBufferData(GL_ELEMENT_ARRAY_BUFFER, data.getSizeBytes(), data.getData(), GL_STATIC_DRAW);
#if defined(USE_LD)
      vgl::increment_data_size_index(data.getSizeBytes());
#endif
    }
开发者ID:faemiyah,项目名称:faemiyah-demoscene_2016-08_80k-intro_my_mistress_the_leviathan,代码行数:25,代码来源:verbatim_index_buffer.hpp


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