summaryrefslogtreecommitdiffstats
path: root/jni/feature_mos/src/mosaic_renderer/WarpRenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'jni/feature_mos/src/mosaic_renderer/WarpRenderer.h')
-rwxr-xr-xjni/feature_mos/src/mosaic_renderer/WarpRenderer.h44
1 files changed, 5 insertions, 39 deletions
diff --git a/jni/feature_mos/src/mosaic_renderer/WarpRenderer.h b/jni/feature_mos/src/mosaic_renderer/WarpRenderer.h
index 774b33f..8e9a694 100755
--- a/jni/feature_mos/src/mosaic_renderer/WarpRenderer.h
+++ b/jni/feature_mos/src/mosaic_renderer/WarpRenderer.h
@@ -1,6 +1,7 @@
#pragma once
#include "FrameBuffer.h"
+#include "Renderer.h"
#include <GLES2/gl2.h>
@@ -8,7 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
-class WarpRenderer {
+class WarpRenderer: public Renderer {
public:
WarpRenderer();
virtual ~WarpRenderer();
@@ -17,45 +18,15 @@ class WarpRenderer {
// @return true if successful
bool InitializeGLProgram();
- bool SetupGraphics(FrameBuffer* buffer);
- bool SetupGraphics(int width, int height);
-
- bool Clear(float r, float g, float b, float a);
-
void SetViewportMatrix(int w, int h, int W, int H);
void SetScalingMatrix(float xscale, float yscale);
- bool DrawTexture(GLfloat *affine);
-
- int GetTextureName();
- void SetInputTextureName(GLuint textureName);
- void SetInputTextureDimensions(int width, int height);
- void SetInputTextureType(GLenum textureType);
-
- void InitializeGLContext();
-
- protected:
-
- GLuint loadShader(GLenum shaderType, const char* pSource);
- GLuint createProgram(const char*, const char* );
- int SurfaceWidth() const { return mSurfaceWidth; }
- int SurfaceHeight() const { return mSurfaceHeight; }
+ bool DrawTexture(GLfloat *affine);
private:
// Source code for shaders.
- virtual const char* VertexShaderSource() const;
- virtual const char* FragmentShaderSource() const;
-
- // Redefine this to use special texture types such as
- // GL_TEXTURE_EXTERNAL_OES.
- virtual GLenum InputTextureType() const { return mInputTextureType; }
-
-
- GLuint mGlProgram;
- GLuint mInputTextureName;
- GLenum mInputTextureType;
- int mInputTextureWidth;
- int mInputTextureHeight;
+ const char* VertexShaderSource() const;
+ const char* FragmentShaderSource() const;
GLuint mTexHandle; // Handle to s_texture.
GLuint mTexCoordHandle; // Handle to a_texCoord.
@@ -73,10 +44,5 @@ class WarpRenderer {
// Sampler location
GLint mSamplerLoc;
-
- int mSurfaceWidth; // Width of target surface.
- int mSurfaceHeight; // Height of target surface.
-
- FrameBuffer *mFrameBuffer;
};