Skip to content

Commit

Permalink
Consolidate immediate mode into RendererGL + shape builder
Browse files Browse the repository at this point in the history
  • Loading branch information
davepagurek committed Nov 3, 2024
1 parent 7d2df7d commit 42628aa
Show file tree
Hide file tree
Showing 13 changed files with 1,142 additions and 1,219 deletions.
208 changes: 109 additions & 99 deletions src/webgl/3d_primitives.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions src/webgl/GeometryBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ class GeometryBuilder {
* Adds geometry from the renderer's immediate mode into the builder's
* combined geometry.
*/
addImmediate() {
const geometry = this.renderer.immediateMode.geometry;
const shapeMode = this.renderer.immediateMode.shapeMode;
addImmediate(geometry, shapeMode) {
const faces = [];

if (this.renderer.states.doFill) {
Expand Down Expand Up @@ -143,7 +141,7 @@ class GeometryBuilder {
* combined geometry.
*/
addRetained(geometry) {
this.addGeometry(geometry.model);
this.addGeometry(geometry);
}

/**
Expand Down
Loading

0 comments on commit 42628aa

Please sign in to comment.