diff --git a/examples/canvas3d/framebuffer/qml/framebuffer/framebuffer.js b/examples/canvas3d/framebuffer/qml/framebuffer/framebuffer.js index b58b34f63ba65adbde019e7061afa471cd661ec1..f2718c1fc5c1c889eaf7a681e6bbbcc591af817a 100644 --- a/examples/canvas3d/framebuffer/qml/framebuffer/framebuffer.js +++ b/examples/canvas3d/framebuffer/qml/framebuffer/framebuffer.js @@ -46,6 +46,7 @@ function initGL(canvas, textureLoader) { gl.cullFace(gl.BACK); gl.enable(gl.DEPTH_WRITE); gl.depthMask(true); + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); // Initialize the shader program initShaders(); diff --git a/examples/canvas3d/interaction/qml/interaction/interaction.js b/examples/canvas3d/interaction/qml/interaction/interaction.js index 933c6e4982c955452a44263770d87e9a501825d8..90c2159769a2561de6f04d68d3cc0f1e98a08d0d 100644 --- a/examples/canvas3d/interaction/qml/interaction/interaction.js +++ b/examples/canvas3d/interaction/qml/interaction/interaction.js @@ -94,6 +94,7 @@ function initGL(canvas, textureLoader) { theModel.indexVBO.name = "BarrelModel.indexVBO"; // Load the barrel texture + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); textureLoader.loadImage("qrc:/qml/interaction/barrel.jpg"); // Load the model diff --git a/examples/canvas3d/jsonmodels/jsonmodels.js b/examples/canvas3d/jsonmodels/jsonmodels.js index 1d2cd8b115eb320f0e5ab0c9927406071b0a82c6..aee7a1c3e496f09a0ff148c5a8a4b195aaea2ba2 100644 --- a/examples/canvas3d/jsonmodels/jsonmodels.js +++ b/examples/canvas3d/jsonmodels/jsonmodels.js @@ -114,6 +114,7 @@ function initGL(canvas, textureLoader) { initBuffers(); // Load textures + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); loadTextures(textureLoader); // Load JSON models diff --git a/examples/canvas3d/plasmaeffects/qml/plasmaeffects/plasmaeffects.js b/examples/canvas3d/plasmaeffects/qml/plasmaeffects/plasmaeffects.js index 4848de79072442d8a52f634b6a8fd9703e5cd51d..99683a4f29399b8ed85c9092e39bf20ae8c29255 100644 --- a/examples/canvas3d/plasmaeffects/qml/plasmaeffects/plasmaeffects.js +++ b/examples/canvas3d/plasmaeffects/qml/plasmaeffects/plasmaeffects.js @@ -61,6 +61,7 @@ function initGL(canvas, textureLoader) { gl.enable(gl.CULL_FACE); gl.cullFace(gl.BACK); gl.disable(gl.BLEND); + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); // Set viewport gl.viewport(0, 0, canvas.width * canvas.devicePixelRatio, diff --git a/examples/canvas3d/textureandlight/qml/textureandlight/textureandlight.js b/examples/canvas3d/textureandlight/qml/textureandlight/textureandlight.js index 24f4abc621f7bcda62214a926630c112bd08cef2..62f0bb7d3ec1dbf763a78645992896bbe98992af 100644 --- a/examples/canvas3d/textureandlight/qml/textureandlight/textureandlight.js +++ b/examples/canvas3d/textureandlight/qml/textureandlight/textureandlight.js @@ -38,6 +38,7 @@ function initGL(canvas, textureLoader) { gl.cullFace(gl.BACK); gl.clearColor(0.0, 0.0, 0.0, 1.0); gl.clearDepth(1.0); + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); //! [2] // Set viewport diff --git a/examples/canvas3d/texturedcube/qml/texturedcube/texturedcube.js b/examples/canvas3d/texturedcube/qml/texturedcube/texturedcube.js index a0e790f16afbb286ea54f2993b41efeb572f9bf4..6df51a8845d9d180abbcbff11a5d863071404033 100644 --- a/examples/canvas3d/texturedcube/qml/texturedcube/texturedcube.js +++ b/examples/canvas3d/texturedcube/qml/texturedcube/texturedcube.js @@ -42,6 +42,7 @@ function initGL(canvas, textureLoader) { gl.clearColor(0.0, 0.0, 0.0, 1.0); gl.clearDepth(1.0); gl.depthFunc(gl.LESS); + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); // Set the viewport gl.viewport(0, 0, canvas.width, canvas.height);