#ifndef DEVICE_VR_VR_GL_UTIL_H_
#define DEVICE_VR_VR_GL_UTIL_H_
#include <array>
#include <string>
#include "base/component_export.h"
#include "device/vr/gl_bindings.h"
#include "third_party/skia/include/core/SkColor.h"
#define SHADER(Src) "#version 100\n" #Src
#define OEIE_SHADER(Src) \
"#version 100\n#extension GL_OES_EGL_image_external : require\n" #Src
#define VOID_OFFSET(x) reinterpret_cast<void*>(x)
namespace gfx {
class Transform;
}
namespace vr {
COMPONENT_EXPORT(DEVICE_VR_BASE)
std::array<float, 16> MatrixToGLArray(const gfx::Transform& matrix);
COMPONENT_EXPORT(DEVICE_VR_BASE)
GLuint CompileShader(GLenum shader_type,
const std::string& shader_source,
std::string& error);
COMPONENT_EXPORT(DEVICE_VR_BASE)
GLuint CreateAndLinkProgram(GLuint vertex_shader_handle,
GLuint fragment_shader_handle,
std::string& error);
COMPONENT_EXPORT(DEVICE_VR_BASE) void SetTexParameters(GLenum texture_type);
COMPONENT_EXPORT(DEVICE_VR_BASE) void SetColorUniform(GLuint handle, SkColor c);
COMPONENT_EXPORT(DEVICE_VR_BASE)
void SetOpaqueColorUniform(GLuint handle, SkColor c);
}
#endif