Skip to content

Commit

Permalink
OpenGL bindings (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefrau committed Dec 14, 2023
1 parent 0634351 commit 21b4399
Show file tree
Hide file tree
Showing 4 changed files with 717 additions and 379 deletions.
6 changes: 5 additions & 1 deletion plopp-b3daccel-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ function B3DAcceleratorPlugin() {
var canvas = document.createElement("canvas");
canvas.width = w;
canvas.height = h;
// this is for Plopp, we ignore the actual rectangle
canvas.style.position = "absolute";
canvas.style.backgroundColor = "transparent";
canvas.style.width = "100%"
canvas.style.height = "100%"
canvas.style.objectFit = "contain";
document.body.appendChild(canvas);
var options = { depth: true, alpha: false, antialias: true };
if (flags & B3D_STENCIL_BUFFER) options.stencil = true;
Expand Down Expand Up @@ -190,7 +194,7 @@ function B3DAcceleratorPlugin() {
console.log("B3DAccel: primitiveSwapRendererBuffers", handle);
// let browser display the rendered frame
this.interpreterProxy.vm.breakNow();
debugger;
// debugger; // wait after each frame
this.interpreterProxy.pop(argCount);
return true;
},
Expand Down
Loading

0 comments on commit 21b4399

Please sign in to comment.