summaryrefslogtreecommitdiffstats
path: root/jni/feature_mos/src/mosaic_renderer/YVURenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'jni/feature_mos/src/mosaic_renderer/YVURenderer.h')
-rwxr-xr-xjni/feature_mos/src/mosaic_renderer/YVURenderer.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/jni/feature_mos/src/mosaic_renderer/YVURenderer.h b/jni/feature_mos/src/mosaic_renderer/YVURenderer.h
new file mode 100755
index 0000000..d14a4b9
--- /dev/null
+++ b/jni/feature_mos/src/mosaic_renderer/YVURenderer.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#include "FrameBuffer.h"
+#include "Renderer.h"
+
+#include <GLES2/gl2.h>
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+class YVURenderer: public Renderer {
+ public:
+ YVURenderer();
+ virtual ~YVURenderer();
+
+ // Initialize OpenGL resources
+ // @return true if successful
+ bool InitializeGLProgram();
+
+ bool DrawTexture();
+
+ private:
+ // Source code for shaders.
+ const char* VertexShaderSource() const;
+ const char* FragmentShaderSource() const;
+
+ // Attribute locations
+ GLint mPositionLoc;
+ GLint mTexCoordLoc;
+
+ // Sampler location
+ GLint mSamplerLoc;
+};
+