Skip to content

Commit a560270

Browse files
committed
fix(core): set size for gl in native
1 parent 93dafef commit a560270

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/core/nativescript/src/lib/canvas.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ export class NgtCanvasNative {
111111

112112
const context = canvas.getContext('webgl2');
113113
const gl = new WebGLRenderer({
114+
canvas,
114115
context: context as unknown as WebGLRenderingContext,
115116
powerPreference: 'high-performance',
116117
antialias: true,
117118
alpha: true,
118119
...untracked(this.gl),
119120
});
121+
gl.setSize(canvasWidth, canvasHeight);
120122

121123
this.zone.runOutsideAngular(() => {
122124
this.configurator = this.initRoot(canvas);

0 commit comments

Comments
 (0)