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.
39 lines
904 B
39 lines
904 B
4 months ago
|
/*
|
||
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2020. All rights reserved.
|
||
|
* Description: Draw bitmap
|
||
|
* Author:
|
||
|
* Create: 2019-08-23
|
||
|
*/
|
||
|
|
||
|
#ifndef OSD_BITMAP_H
|
||
|
#define OSD_BITMAP_H
|
||
|
|
||
|
#include <memory>
|
||
|
#include "Common.h"
|
||
|
#include "ShaderProgram.h"
|
||
|
|
||
|
namespace dolgles {
|
||
|
using std::unique_ptr;
|
||
|
|
||
|
class OSDBitmap {
|
||
|
public:
|
||
|
OSDBitmap();
|
||
|
~OSDBitmap();
|
||
|
EGL_S32 Init();
|
||
|
void DisplayBitmap(const GLBitmapInfo &bitmapInfo, GLsizei winWidth, GLsizei winHeight);
|
||
|
void DrawBitmap(const FrameBuffObject &fbo, const GLBitmapInfo &bitmapInfo);
|
||
|
private:
|
||
|
void RenderBitmap(const GLRectInfo &rect) const;
|
||
|
void CreateTexture(const GLBitmapInfo &bitmapInfo);
|
||
|
void DeleteTexture();
|
||
|
|
||
|
unique_ptr<ShaderProgram> shaderProgram;
|
||
|
GLuint texture;
|
||
|
GLuint program;
|
||
|
GLuint vbo;
|
||
|
GLint uniformTex;
|
||
|
GLint attribCoord;
|
||
|
};
|
||
|
}; // namespace dolgles
|
||
|
|
||
|
#endif // end OSD_BITMAP_H
|