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


TypeScript Program.set_shaders方法代码示例

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


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

示例1: init

  init() {

    const { gl } = this;
    const frag = this.FRAG.replace(/MARKERCODE/, this.MARKERCODE);

    this.last_trans = {};  // Keep track of transform

    // The program
    this.prog = new Program(gl);
    this.prog.set_shaders(this.VERT, frag);
    // Real attributes
    this.vbo_x = new VertexBuffer(gl);
    this.prog.set_attribute('a_x', 'float', this.vbo_x);
    this.vbo_y = new VertexBuffer(gl);
    this.prog.set_attribute('a_y', 'float', this.vbo_y);
    this.vbo_s = new VertexBuffer(gl);
    this.prog.set_attribute('a_size', 'float', this.vbo_s);
    this.vbo_a = new VertexBuffer(gl);
    this.prog.set_attribute('a_angle', 'float', this.vbo_a);
    // VBO's for attributes (they may not be used if value is singleton)
    this.vbo_linewidth = new VertexBuffer(gl);
    this.vbo_fg_color = new VertexBuffer(gl);
    this.vbo_bg_color = new VertexBuffer(gl);
    return this.index_buffer = new IndexBuffer(gl);
  }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:25,代码来源:markers.ts

示例2: init

    init(): void {
      const {gl} = this;
      this._scale_aspect = 0;  // keep track, so we know when we need to update segment data

      // The program
      this.prog = new Program(gl);
      this.prog.set_shaders(this.VERT, this.FRAG);
      this.index_buffer = new IndexBuffer(gl);
      // Buffers
      this.vbo_position = new VertexBuffer(gl);
      this.vbo_tangents = new VertexBuffer(gl);
      this.vbo_segment = new VertexBuffer(gl);
      this.vbo_angles = new VertexBuffer(gl);
      this.vbo_texcoord = new VertexBuffer(gl);
      // Dash atlas
      this.dash_atlas = new DashAtlas(gl);
    }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:17,代码来源:line.ts

示例3: init

  protected init(): void {
    const {gl} = this

    const vert = vertex_shader
    const frag = fragment_shader(this._marker_code)

    // The program
    this.prog = new Program(gl)
    this.prog.set_shaders(vert, frag)
    // Real attributes
    this.vbo_x = new VertexBuffer(gl)
    this.prog.set_attribute('a_x', 'float', this.vbo_x)
    this.vbo_y = new VertexBuffer(gl)
    this.prog.set_attribute('a_y', 'float', this.vbo_y)
    this.vbo_s = new VertexBuffer(gl)
    this.prog.set_attribute('a_size', 'float', this.vbo_s)
    this.vbo_a = new VertexBuffer(gl)
    this.prog.set_attribute('a_angle', 'float', this.vbo_a)
    // VBO's for attributes (they may not be used if value is singleton)
    this.vbo_linewidth = new VertexBuffer(gl)
    this.vbo_fg_color = new VertexBuffer(gl)
    this.vbo_bg_color = new VertexBuffer(gl)
    this.index_buffer = new IndexBuffer(gl)
  }
开发者ID:gully,项目名称:bokeh,代码行数:24,代码来源:markers.ts


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