Skip to content

Commit

Permalink
Use generic controller instead of oculus specific for comic book sample
Browse files Browse the repository at this point in the history
Check for invalid texture in draw call
  • Loading branch information
idrisshah committed Sep 20, 2024
1 parent daf507e commit 1af04d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/showcase/comicbook/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
</a-assets>
<a-entity
layer="src: #page1; height: 3; width: 1.9505"></a-entity>
<a-entity oculus-touch-controls="hand: left" page-controls></a-entity>
<a-entity oculus-touch-controls="hand: right" page-controls></a-entity>
<a-entity id="leftHand" laser-controls="hand: left" raycaster="objects: .raycastable" page-controls></a-entity>
<a-entity id="rightHand" laser-controls="hand: right" raycaster="objects: .raycastable" line="color: #118A7E" page-controls></a-entity>
</a-scene>
</body>
</html>
1 change: 1 addition & 0 deletions src/components/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ module.exports.Component = registerComponent('layer', {
draw: function () {
var sceneEl = this.el.sceneEl;
var gl = this.el.sceneEl.renderer.getContext();
if (!this.texture) { return; }
var glayer = this.xrGLFactory.getSubImage(this.layer, sceneEl.frame);
var texture = sceneEl.renderer.properties.get(this.texture).__webglTexture;
var previousFrameBuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);
Expand Down

0 comments on commit 1af04d2

Please sign in to comment.