orep-js/sunpy/canvas/gl/texture.js

23 lines
562 B
JavaScript
Raw Permalink Normal View History

//const fs = await (await fetch("./shaders/texture.fs")).text();
export async function compile() {
/*
const fs = await (await fetch("./shaders/texture.fs")).text();
const vs = await (await fetch("./shaders/texture.vs")).text();
*/
const fs = import("./shaders/texture.fs");
const vs = import("./shaders/texture.vs");
window.fs = fs;
window.vs = vs;
console.log("done");
}
export function drawImage(gl, tex, texWidth, texHeight, dstX, dstY) {
gl.bindTexture(gl.TEXTURE_2D, tex);
gl.useProgram(program); // TODO
}