Browse Source

my commit

texture and coordinatets
pull/1165/head
Sanchit 1 year ago
committed by GitHub
parent
commit
4f9add7fbc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/js/libpannellum.js

+ 2
- 0
src/js/libpannellum.js View File

@@ -404,6 +404,7 @@ function Renderer(container, context) {
gl.clear(gl.COLOR_BUFFER_BIT);
}

//<<COMMENT>> 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]));
}

//<<COMMENT>> webgl: createTexture creates tthe texture and reuturn tthe cubes
// Create texture
program.texture = gl.createTexture();
gl.bindTexture(glBindType, program.texture);


Loading…
Cancel
Save