Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Don't create GL objects in the tile worker thread #926

Closed
kkaefer opened this issue Feb 27, 2015 · 4 comments
Closed

Don't create GL objects in the tile worker thread #926

kkaefer opened this issue Feb 27, 2015 · 4 comments

Comments

@kkaefer
Copy link
Contributor

kkaefer commented Feb 27, 2015

We should check that we're not creating any GL objects or calling any GL functions in general in anything but the Map thread.

@ljbade
Copy link
Contributor

ljbade commented Feb 27, 2015

Hmm, easiest way is it look at the attach/detach functions since any GL calls in a thread without a GL context bound will throw and exception.

@kkaefer
Copy link
Contributor Author

kkaefer commented Feb 27, 2015

FWIW, I don't think we're currently doing this, but we should do a proper review to avoid any undefined effects later on.

@ljbade
Copy link
Contributor

ljbade commented Feb 27, 2015

Another trick would be to add a thread ID check to the GL function error check wrappers.

@jfirebaugh
Copy link
Contributor

Creation of GL objects now requires a GLObjectStore, which the worker thread does not have access to, so we can be fairly certain this does not happen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants