diff options
Diffstat (limited to 'jni_mosaic/feature_mos/src/mosaic_renderer/Renderer.h')
-rwxr-xr-x | jni_mosaic/feature_mos/src/mosaic_renderer/Renderer.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/jni_mosaic/feature_mos/src/mosaic_renderer/Renderer.h b/jni_mosaic/feature_mos/src/mosaic_renderer/Renderer.h deleted file mode 100755 index a43e8028e..000000000 --- a/jni_mosaic/feature_mos/src/mosaic_renderer/Renderer.h +++ /dev/null @@ -1,65 +0,0 @@ -#pragma once - -#include "FrameBuffer.h" - -#include <GLES2/gl2.h> - -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> - -class Renderer { - public: - Renderer(); - virtual ~Renderer(); - - // Initialize OpenGL resources - // @return true if successful - virtual bool InitializeGLProgram() = 0; - - bool SetupGraphics(FrameBuffer* buffer); - bool SetupGraphics(int width, int height); - - bool Clear(float r, float g, float b, float a); - - 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; } - - // Source code for shaders. - virtual const char* VertexShaderSource() const = 0; - virtual const char* FragmentShaderSource() const = 0; - - // Redefine this to use special texture types such as - // GL_TEXTURE_EXTERNAL_OES. - GLenum InputTextureType() const { return mInputTextureType; } - - GLuint mGlProgram; - GLuint mInputTextureName; - GLenum mInputTextureType; - int mInputTextureWidth; - int mInputTextureHeight; - - // Attribute locations - GLint mScalingtransLoc; - GLint maPositionHandle; - GLint maTextureHandle; - - - int mSurfaceWidth; // Width of target surface. - int mSurfaceHeight; // Height of target surface. - - FrameBuffer *mFrameBuffer; -}; - |