greggman / twgl.js

A Tiny WebGL helper Library
http://twgljs.org
MIT License
2.61k stars 258 forks source link

getProgramOptions ignores transformFeedbackMode #153

Closed Zaitsev closed 4 years ago

Zaitsev commented 4 years ago

transformFeedbackMode is declared in export type ProgramOptions but ignored in getProgramOptions #118 src/programs.js

@@ -537,6 +537,7 @@ function loadShader(gl, shaderSource, shaderType, opt_errorCallback) {
 */
function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
  let transformFeedbackVaryings;
+  let transformFeedbackMode;
  if (typeof opt_locations === 'function') {
    opt_errorCallback = opt_locations;
    opt_locations = undefined;
@@ -554,11 +555,13 @@ function getProgramOptions(opt_attribs, opt_locations, opt_errorCallback) {
    opt_errorCallback = opt.errorCallback;
    opt_attribs = opt.attribLocations;
    transformFeedbackVaryings = opt.transformFeedbackVaryings;
+    transformFeedbackMode = opt.transformFeedbackMode;
  }

  const options = {
    errorCallback: opt_errorCallback || error,
    transformFeedbackVaryings: transformFeedbackVaryings,
+    transformFeedbackMode: transformFeedbackMode,
  };

  if (opt_attribs) {
greggman commented 4 years ago

https://github.com/greggman/twgl.js/commit/d55ce9c673201a67bed3b6e77f852c4164c4fa8c