Skip to content

Commit

Permalink
Context cleanup (#1611)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Jan 24, 2022
1 parent aab1dbc commit f96c784
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 76 deletions.
2 changes: 1 addition & 1 deletion modules/gltools/src/classic/texture-cube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Texture, {TextureProps} from './texture';

/**
* Cube Texture
* @deprecated Use device.createTexture({dimension: '3d'})
* @deprecated Use device.createTexture({dimension: 'cube'})
*/
export default class TextureCube extends Texture {
static FACES: number[] = [
Expand Down
5 changes: 4 additions & 1 deletion modules/gltools/src/engine/classic-animation-loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ const DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS: Required<ClassicAnimationLoopProps>
createFramebuffer: false
};

/** Convenient animation loop */
/**
* Convenient animation loop
* @deprecated Use `@luma.gl/engine` AnimationLoop
*/
export default class ClassicAnimationLoop {
device: Device;
canvas: HTMLCanvasElement | OffscreenCanvas;
Expand Down
1 change: 1 addition & 0 deletions modules/gltools/src/engine/classic-clip-space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ void main(void) {
/* eslint-disable indent, no-multi-spaces */
const POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];

/** @deprecated Use new class in `@luma.gl/engine` */

export default class ClipSpace extends Model {
constructor(gl: WebGLRenderingContext, opts?: ModelProps) {
Expand Down
5 changes: 4 additions & 1 deletion modules/gltools/src/webgl-utils/texture-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import Framebuffer, {ClassicFramebufferProps} from '../classic/framebuffer';

type TextureType = Texture2D | TextureCube | Texture3D;

/** Clone a new texture object from a reference texture object. */
/**
* Clone a new texture object from a reference texture object.
* @deprecated
*/
export function cloneTextureFrom<T extends TextureType>(refTexture: T, overrides?: any): T {
assert(
refTexture instanceof Texture2D ||
Expand Down
4 changes: 2 additions & 2 deletions modules/webgl/src/adapter/webgl-device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {getDeviceInfo} from './device-helpers/get-device-info';
import {getDeviceFeatures} from './device-helpers/device-features';
import {getDeviceLimits, getWebGLLimits, WebGLLimits} from './device-helpers/device-limits';
import WebGLCanvasContext from './webgl-canvas-context';
import {loadSpectorJS, initializeSpectorJS} from '../debug/spector';
import {loadWebGLDeveloperTools, makeDebugContext} from '../debug/webgl-developer-tools';
import {loadSpectorJS, initializeSpectorJS} from '../context/debug/spector';
import {loadWebGLDeveloperTools, makeDebugContext} from '../context/debug/webgl-developer-tools';
import {
isTextureFormatSupported,
isTextureFormatRenderable,
Expand Down
37 changes: 0 additions & 37 deletions modules/webgl/src/context/context/resize-context.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// luma.gl, MIT license
import {log, loadScript} from '@luma.gl/api';
import {document} from 'probe.gl/env';

/** Spector debug initialization options */
type SpectorProps = {
Expand Down
1 change: 0 additions & 1 deletion modules/webgl/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ export {polyfillContext} from './context/polyfill/polyfill-context';

// HELPERS - EXPERIMENTAL
export {getProgramBindings} from './adapter/helpers/get-program-bindings';
export {loadWebGLDeveloperTools} from './debug/webgl-developer-tools';
export {_checkFloat32ColorAttachment} from './adapter/converters/texture-formats';
29 changes: 0 additions & 29 deletions modules/webgl/src/types/accessor.d.ts

This file was deleted.

4 changes: 1 addition & 3 deletions test/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

// Make sure the WebGL developer tools are pre-loaded. Test contexts are created synchronously
import '@luma.gl/debug';
// import {loadWebGLDeveloperTools} from '@luma.gl/webgl';
// await loadWebGLDeveloperTools(); - Doesn't work in Node.js

// Shadertools is a GLSL textual processing library, no actual WebGL dependencies
// import '../modules/shadertools/test';
import '../modules/shadertools/test';

// WEBGL-DEPENDENT TESTS

Expand Down

0 comments on commit f96c784

Please sign in to comment.