waylonflinn / weblas

GPU Powered BLAS for Browsers :gem:
MIT License
702 stars 43 forks source link

Refactor Calculators to Use More StackGL #22

Open waylonflinn opened 8 years ago

waylonflinn commented 8 years ago

This should reduce code duplication in the Calculator classes significantly (eliminating bindUniforms and potentially bindInputTexture).


  //Bind shader
  shader.bind();

...

  //Set uniforms
  shader.uniforms.M = M_out;
  shader.uniforms.N = N_out;
  shader.uniforms.pad = pad_out;

from gl-shader

  shader.uniforms.texture = texture.bind()

from gl-texture2d

Other potentially useful classes: