Skip to content

Commit

Permalink
Merge ae23c02 into 5186867
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy authored Mar 14, 2024
2 parents 5186867 + ae23c02 commit a4f8a8b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions modules/core/src/adapter/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,11 @@ export abstract class Device {
throw new Error('not implemented');
}

/** @deprecated */
resetWebGL(): void {
throw new Error('not implemented');
}

timestamp: number = 0;

/** A monotonic counter for tracking buffer and texture updates */
Expand Down
10 changes: 9 additions & 1 deletion modules/webgl/src/adapter/webgl-device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ import {WEBGLTransformFeedback} from './resources/webgl-transform-feedback';
import {WEBGLQuerySet} from './resources/webgl-query-set';

import {readPixelsToArray, readPixelsToBuffer} from '../classic/copy-and-blit';
import {setGLParameters, getGLParameters} from '../context/parameters/unified-parameter-api';
import {
setGLParameters,
getGLParameters,
resetGLParameters
} from '../context/parameters/unified-parameter-api';
import {withGLParameters} from '../context/state-tracker/with-parameters';
import {clear} from '../classic/clear';
import {getWebGLExtension} from '../context/helpers/webgl-extensions';
Expand Down Expand Up @@ -412,6 +416,10 @@ ${device.info.vendor}, ${device.info.renderer} for canvas: ${device.canvasContex
clear(this, options);
}

override resetWebGL(): void {
resetGLParameters(this.gl);
}

//
// WebGL-only API (not part of `Device` API)
//
Expand Down

0 comments on commit a4f8a8b

Please sign in to comment.