Open Deamon87 opened 4 months ago
Hi.
As of now there is no possible way to pass opt_locations from typescript for createProgramInfo and other similar functions.
opt_locations
createProgramInfo
At the moment of writing, createProgramInfo is defined as
export function createProgramInfo(gl: WebGLRenderingContext, shaderSources: string[], opt_attribs?: ProgramOptions | string[] | ErrorCallback, opt_errorCallback?: ErrorCallback): ProgramInfo;
Thus it has 4 parameters: gl, shaderSources, opt_attribs, opt_errorCallback
gl
shaderSources
opt_attribs
opt_errorCallback
While in reality, the js function takes 5 parameters: gl, shaderSources, opt_attribs, opt_locations, opt_errorCallback
js
function createProgramInfo(gl, shaderSources, opt_attribs, opt_locations, opt_errorCallback) {
thanks for the bug report. Fixed in v5.5.4 I think
https://github.com/greggman/twgl.js/commit/b4899666d5cd9632d3d82269236539a3ac2a9c97
Hi.
As of now there is no possible way to pass
opt_locations
from typescript forcreateProgramInfo
and other similar functions.At the moment of writing,
createProgramInfo
is defined asThus it has 4 parameters:
gl
,shaderSources
,opt_attribs
,opt_errorCallback
While in reality, the
js
function takes 5 parameters:gl
,shaderSources
,opt_attribs
,opt_locations
,opt_errorCallback