Flutter Engine
The Flutter Engine
Classes | Typedefs | Functions
GrGLInterface.h File Reference
#include "include/core/SkRefCnt.h"
#include "include/gpu/gl/GrGLExtensions.h"
#include "include/gpu/gl/GrGLFunctions.h"

Go to the source code of this file.

Classes

struct  GrGLInterface
 
struct  GrGLInterface::Functions
 

Typedefs

typedef void(* GrGLFuncPtr) ()
 

Functions

SK_API sk_sp< const GrGLInterfaceGrGLMakeNativeInterface ()
 

Typedef Documentation

◆ GrGLFuncPtr

typedef void(* GrGLFuncPtr) ()

Definition at line 17 of file GrGLInterface.h.

Function Documentation

◆ GrGLMakeNativeInterface()

SK_API sk_sp< const GrGLInterface > GrGLMakeNativeInterface ( )

Rather than depend on platform-specific GL headers and libraries, we require the client to provide a struct of GL function pointers. This struct can be specified per-GrContext as a parameter to GrContext::MakeGL. If no interface is passed to MakeGL then a default GL interface is created using GrGLMakeNativeInterface(). If this returns nullptr then GrContext::MakeGL() will fail.

The implementation of GrGLMakeNativeInterface is platform-specific. Several implementations have been provided (for GLX, WGL, EGL, etc), along with an implementation that simply returns nullptr. Clients should select the most appropriate one to build.

Definition at line 12 of file GrGLMakeNativeInterface_egl.cpp.

12{ return GrGLMakeEGLInterface(); }
sk_sp< const GrGLInterface > GrGLMakeEGLInterface()