From 4f9add7fbc7551f7bde1aa0474e3a0a5ca201436 Mon Sep 17 00:00:00 2001 From: Sanchit <43117486+nohosh@users.noreply.github.com> Date: Tue, 23 May 2023 22:43:59 +0530 Subject: [PATCH] my commit texture and coordinatets --- src/js/libpannellum.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/libpannellum.js b/src/js/libpannellum.js index ef6ff41..dc50ab3 100644 --- a/src/js/libpannellum.js +++ b/src/js/libpannellum.js @@ -404,6 +404,7 @@ function Renderer(container, context) { gl.clear(gl.COLOR_BUFFER_BIT); } +//<> webgl: getAttribLocation fetches the coordinates // Look up texture coordinates location program.texCoordLocation = gl.getAttribLocation(program, 'a_texCoord'); gl.enableVertexAttribArray(program.texCoordLocation); @@ -440,6 +441,7 @@ function Renderer(container, context) { gl.uniform4fv(program.backgroundColor, color.concat([1])); } +//<> webgl: createTexture creates tthe texture and reuturn tthe cubes // Create texture program.texture = gl.createTexture(); gl.bindTexture(glBindType, program.texture);