• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 ROSENRENDER_ROSEN_WEBGL2_RENDERING_CONTEXT_OVERLOADS
17 #define ROSENRENDER_ROSEN_WEBGL2_RENDERING_CONTEXT_OVERLOADS
18 
19 
20 #include "GLES3/gl3.h"
21 #include <EGL/egl.h>
22 #include <EGL/eglext.h>
23 #include "../../../common/napi/n_exporter.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 namespace OHOS {
30 namespace Rosen {
31 class WebGL2RenderingContextOverloads {
32 public:
33     static napi_value BufferData(napi_env env, napi_callback_info info);
34 
35     static napi_value BufferSubData(napi_env env, napi_callback_info info);
36 
37     static napi_value TexImage2D(napi_env env, napi_callback_info info);
38 
39     static napi_value TexSubImage2D(napi_env env, napi_callback_info info);
40 
41     static napi_value CompressedTexImage2D(napi_env env, napi_callback_info info);
42 
43     static napi_value CompressedTexSubImage2D(napi_env env, napi_callback_info info);
44 
45     static napi_value Uniform1fv(napi_env env, napi_callback_info info);
46 
47     static napi_value Uniform2fv(napi_env env, napi_callback_info info);
48 
49     static napi_value Uniform3fv(napi_env env, napi_callback_info info);
50 
51     static napi_value Uniform4fv(napi_env env, napi_callback_info info);
52 
53     static napi_value Uniform1iv(napi_env env, napi_callback_info info);
54 
55     static napi_value Uniform2iv(napi_env env, napi_callback_info info);
56 
57     static napi_value Uniform3iv(napi_env env, napi_callback_info info);
58 
59     static napi_value Uniform4iv(napi_env env, napi_callback_info info);
60 
61     static napi_value UniformMatrix2fv(napi_env env, napi_callback_info info);
62 
63     static napi_value UniformMatrix3fv(napi_env env, napi_callback_info info);
64 
65     static napi_value UniformMatrix4fv(napi_env env, napi_callback_info info);
66 
67     static napi_value ReadPixels(napi_env env, napi_callback_info info);
68 };
69 } // namespace Rosen
70 } // namespace OHOS
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif // ROSENRENDER_ROSEN_WEBGL2_RENDERING_CONTEXT_OVERLOADS
77