Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move context creation/query functions to gltools #1299

Merged
merged 10 commits into from Nov 27, 2019
Merged

Conversation

tsherif
Copy link
Contributor

@tsherif tsherif commented Nov 27, 2019

  • Moves the following to gltools:
    • Context creation and query functions: createGLContext, resizeGLContext, instrumentGLContext, getContextDebugInfo, cssToDeviceRatio, cssToDevicePixels, isWebGL, isWebGL2
    • Environment test variables: isBrowser, isBrowserMainThread, isNode, isElectron, global, window, self
  • Consolidate gltools utilities
  • Remove global polyfills of WebGL2RenderingContext and Image (are these used anywhere? luma.gl and deck.gl tests pass without them)
  • Remove unreferenced context creation options throwOnError

@coveralls
Copy link

coveralls commented Nov 27, 2019

Coverage Status

Coverage increased (+0.3%) to 61.66% when pulling a930ef2 on context-gltools into 9946d2c on master.

// COMMON CONTEXT PARAMETERS
// Attempt to allocate WebGL2 context
webgl2: true, // Attempt to create a WebGL2 context (false to force webgl1)
webgl1: true, // Attempt to create a WebGL1 context (false to fail if webgl2 not available)
throwOnFailure: true,
throwOnError: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there documentation that needs to be updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mentioned anywhere, never used anywhere. Just a ghost prop leftover from a prior refactor I'm guessing.

withParameters,
isWebGL,
isWebGL2
} from '@luma.gl/gltools';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the atom modules should avoid re-exporting APIs from their dependencies. Whoever importing these from the webgl module should switch to importing from gltools, so that we are perfectly clear where things live.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

@tsherif tsherif merged commit f622105 into master Nov 27, 2019
@tsherif tsherif deleted the context-gltools branch November 27, 2019 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants