Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 25b388c4 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

better fix for [3028370] GL get error should return a valid error if no context is bound.

it turns out that we cannot return INVALID_OPERATION from glGetError() because the
GL spec says that it must be called in a loop until it returns GL_NO_ERROR.

now, we always return 0 from GL functions called from a thread with no
context bound. This means that glGetError() will return NO_ERROR in this case,
which is better than returning a random value (which could trap the app in a loop).

if this happens in the main thread of a process, we LOG an error message once.

Change-Id: Id59620e675a890286ef62a257c02b06e0fdcaf69
parent 5c6c5c7a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment