How can I make GL context current?

Skip to first unread message

Eat Sponsors

Jan 31, 2023, 12:37:53 PMJan 31
to Chromium-dev
I have a third_party shared library, and in this, I am trying to use the current GL context.  It does not seem to be able to get the current context, so I am now thinking maybe there is in fact no current context in Chromium.

So I am wondering, how can I make my GL context current?

I have this function to get GL context:

scoped_refptr<viz::ContextProvider> GetContextProvider() {
return aura::Env::GetInstance()

I use it like this:

auto context_provider = GetContextProvider();
gpu::gles2::GLES2Interface* gl = GetContextProvider()->ContextGL();

Can anyone suggest how I can make sure this gl context is current so that when I call into my third_party shared library I am sure there is a current GL context?


Reply all
Reply to author
0 new messages