From 8bddf8ce4f3dcbb56edb12cee7e93f3a9daa3f96 Mon Sep 17 00:00:00 2001 From: Sascha Haeberling Date: Wed, 14 Aug 2013 11:20:34 -0700 Subject: Copy over libjni_mosaic from Camera. We need to support the SRI pano mode for Carlsbad. Change-Id: Id14e64d8248236e8170c12cfca2cbf2ca952e993 --- .../src/mosaic_renderer/SurfaceTextureRenderer.h | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 jni/feature_mos/src/mosaic_renderer/SurfaceTextureRenderer.h (limited to 'jni/feature_mos/src/mosaic_renderer/SurfaceTextureRenderer.h') diff --git a/jni/feature_mos/src/mosaic_renderer/SurfaceTextureRenderer.h b/jni/feature_mos/src/mosaic_renderer/SurfaceTextureRenderer.h new file mode 100755 index 000000000..ea2b81ade --- /dev/null +++ b/jni/feature_mos/src/mosaic_renderer/SurfaceTextureRenderer.h @@ -0,0 +1,44 @@ +#pragma once + +#include "FrameBuffer.h" +#include "Renderer.h" + +#include + +#include +#include +#include + +class SurfaceTextureRenderer: public Renderer { + public: + SurfaceTextureRenderer(); + virtual ~SurfaceTextureRenderer(); + + // Initialize OpenGL resources + // @return true if successful + bool InitializeGLProgram(); + + bool DrawTexture(GLfloat *affine); + + void SetViewportMatrix(int w, int h, int W, int H); + void SetScalingMatrix(float xscale, float yscale); + void SetSTMatrix(float *stmat); + + private: + // Source code for shaders. + const char* VertexShaderSource() const; + const char* FragmentShaderSource() const; + + // Attribute locations + GLint mScalingtransLoc; + GLint muSTMatrixHandle; + GLint maPositionHandle; + GLint maTextureHandle; + + GLfloat mViewportMatrix[16]; + GLfloat mScalingMatrix[16]; + + GLfloat mSTMatrix[16]; + +}; + -- cgit v1.2.3