23#include "GLES2/gl2ext.h"
25#include "absl/log/log.h"
33#define CHECK_GL_ERROR() \
35 if (GLenum error = gles->glGetError(); error != GL_NO_ERROR) { \
36 LOG(ERROR) << __FILE__ << ":" << __LINE__ << ":" << __PRETTY_FUNCTION__ \
37 << " found error: " << error; \
53 const std::string& shader_source);
55 std::optional<GLuint>
CreateProgram(
const std::string& vert_shader_source,
56 const std::string& frag_shader_source);
58#define DECLARE_GLES_FUNCTION_MEMBER_POINTER(return_type, function_name, \
60 return_type(*function_name) signature = nullptr;
Lib lib_
Definition: gles.h:69
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:58