You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
669 B

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2020. All rights reserved.
* Description: Draw rect
* Author:
* Create: 2019-08-23
*/
#ifndef OSD_RECT_H
#define OSD_RECT_H
#include <memory>
#include "Common.h"
#include "ShaderProgram.h"
namespace dolgles {
using std::unique_ptr;
class OSDRect {
public:
OSDRect();
~OSDRect();
EGL_S32 Init();
void DrawRect(const FrameBuffObject &fbo,
const GLRectInfo &rect, const ColorRGBA &color) const;
private:
unique_ptr<ShaderProgram> shaderProgram;
GLuint program;
GLuint vbo;
GLint vPosition;
GLint uniformColor;
};
}; // namespace dolgles
#endif // end OSD_RECT_H