25 #ifndef AAMPCLISHADER_H
26 #define AAMPCLISHADER_H
31 #ifdef RENDER_FRAMES_IN_APP_CONTEXT
33 #define GL_SILENCE_DEPRECATION
34 #include <OpenGL/gl3.h>
35 #include <GLUT/glut.h>
39 #include <GL/freeglut.h>
41 #include <glm/glm.hpp>
42 #include <glm/gtc/matrix_transform.hpp>
43 #include <glm/gtc/type_ptr.hpp>
47 #ifdef RENDER_FRAMES_IN_APP_CONTEXT
48 #define ATTRIB_VERTEX 0
49 #define ATTRIB_TEXTURE 1
53 #ifdef RENDER_FRAMES_IN_APP_CONTEXT
57 uint8_t *yuvBuffer = NULL;
63 static const int FPS = 60;
64 static AppsinkData appsinkData;
65 static std::mutex appsinkData_mutex;
66 static GLuint mProgramID;
67 static GLuint id_y, id_u, id_v;
68 static GLuint textureUniformY, textureUniformU,textureUniformV;
69 static GLuint _vertexArray;
70 static GLuint _vertexBuffer[2];
71 static GLfloat currentAngleOfRotation;
73 GLuint LoadShader(GLenum type);
75 static void glRender(
void);
76 static void updateYUVFrame(uint8_t *buffer,
int size,
int width,
int height);
77 static void timer(
int v);
81 #endif // AAMPCLISHADER_H