1 #pragma once
2 
3 #ifdef __ANDROID__
4 #include <GLES3/gl3.h>
5 #include <GLES3/gl3ext.h>
6 #endif
7 #ifdef __APPLE__
8 #include <OpenGLES/ES3/gl.h>
9 #endif
10 
11 #include <jsi/jsi.h>
12 #include <vector>
13 
14 namespace expo {
15 namespace gl_cpp {
16 
17 GLuint bytesPerPixel(GLenum type, GLenum format);
18 
19 void flipPixels(GLubyte *pixels, size_t bytesPerRow, size_t rows);
20 
21 std::shared_ptr<uint8_t> loadImage(
22     facebook::jsi::Runtime &runtime,
23     const facebook::jsi::Object &jsPixels,
24     int *fileWidth,
25     int *fileHeight,
26     int *fileComp);
27 } // namespace gl_cpp
28 } // namespace expo
29