• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OH_VEF_GRAPHICS_SHADER_PASS_SURFACE_H
17 #define OH_VEF_GRAPHICS_SHADER_PASS_SURFACE_H
18 
19 #include <GLES3/gl3.h>
20 #include "render/graphics/base/math/render_matrix.h"
21 #include "shader_pass.h"
22 
23 namespace OHOS {
24 namespace Media {
25 class SurfaceData : public RenderEffectData {
26 public:
27     Mat4x4 uTexMatrix;
28     GLuint nativeTexId;
29 };
30 using SurfaceDataPtr = std::shared_ptr<SurfaceData>;
31 
32 class ShaderPassSurface : public ShaderPass {
33 public:
34     explicit ShaderPassSurface(RenderContext* context);
35     ~ShaderPassSurface() override;
36 
37     SurfaceDataPtr GetRenderEffectData();
38 
39 protected:
40     void PreDraw() override;
41     void PostDraw() override;
42 };
43 using ShaderPassSurfacePtr = std::shared_ptr<ShaderPassSurface>;
44 }
45 }
46 
47 #endif