Skip to content

Commit

Permalink
Fix manual clear buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
fedegratti committed Feb 24, 2022
1 parent ffccf35 commit 42a6e22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v6.3.3
v6.3.4
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ohzi-core",
"version": "6.3.3",
"version": "6.3.4",
"description": "OHZI Core Library",
"source": "src/index.js",
"module": "build/index.module.js",
Expand Down
7 changes: 5 additions & 2 deletions src/Graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ class Graphics
this.canvas_context = undefined;
this.context_attributes = undefined;

this.context_attributes = context_attributes || {
this.context_attributes = {
alpha: true,
depth: true,
desynchronized: false,
stencil: false,
antialias: false,
premultipliedAlpha: true,
preserveDrawingBuffer: false,
preserveDrawingBuffer: true,
powerPreference: 'high-performance',
logarithmicDepthBuffer: false
};

Object.assign(this.context_attributes, context_attributes);

if (context_attributes.force_webgl2)
{
this.canvas_context = canvas.getContext('webgl2', this.context_attributes) ||
Expand All @@ -57,6 +59,7 @@ class Graphics
canvas: canvas,
context: this.canvas_context
});

this._renderer.autoClear = false;

this._renderer.setPixelRatio(1);
Expand Down

0 comments on commit 42a6e22

Please sign in to comment.