23#include "GLES2/gl2ext.h"
32#define CHECK_GL_ERROR() \
34 if (GLenum error = gles->glGetError(); error != GL_NO_ERROR) { \
35 LOG(ERROR) << __FILE__ << ":" << __LINE__ << ":" << __PRETTY_FUNCTION__ \
36 << " found error: " << error; \
52 const std::string& shader_source);
54 std::optional<GLuint>
CreateProgram(
const std::string& vert_shader_source,
55 const std::string& frag_shader_source);
57#define DECLARE_GLES_FUNCTION_MEMBER_POINTER(return_type, function_name, \
59 return_type(*function_name) signature = nullptr;
Lib lib_
Definition: gles.h:68
static gfxstream::expected< Gles, std::string > Load()
Definition: gles.cpp:34
Gles & operator=(Gles &&)=default
FOR_EACH_GLES_FUNCTION(DECLARE_GLES_FUNCTION_MEMBER_POINTER)
Gles & operator=(const Gles &)=delete
std::optional< GLuint > CreateShader(GLenum shader_type, const std::string &shader_source)
Definition: gles.cpp:106
std::optional< GLuint > CreateProgram(const std::string &vert_shader_source, const std::string &frag_shader_source)
Definition: gles.cpp:131
static gfxstream::expected< Gles, std::string > LoadFromEgl(Egl *egl)
Definition: gles.cpp:66
Gles(const Gles &)=delete
void Init()
Definition: gles.cpp:81
Definition: expected.h:33
#define DECLARE_GLES_FUNCTION_MEMBER_POINTER(return_type, function_name, signature, args)
Definition: gles.h:57