summaryrefslogtreecommitdiffstats
path: root/jni/feature_mos/src/mosaic_renderer/YVURenderer.h
blob: d14a4b9906335b8d7d959623348149d571839183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
};