2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __MEDIA_VISION_UTIL_RENDER_2D_H__
18 #define __MEDIA_VISION_UTIL_RENDER_2D_H__
22 #endif /* __cplusplus */
24 #include <mv_common.h>
32 #define pixfmt_fourcc(a, b, c, d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
34 typedef struct _texture_2d_t {
41 uint32_t create_2d_texture(void *imgbuf, int width, int height);
42 int init_2d_renderer(int w, int h);
43 int load_texture(mv_source_h source, int *lpTexID, int *lpWidth, int *lpHeight);
44 int draw_2d_texture(texture_2d_t *tex, int x, int y, int w, int h, int upsidedown);
45 int egl_init_with_platform_window_surface(int gles_version, int depth_size, int stencil_size, int sample_num, int win_w,
51 #endif /* __cplusplus */
53 #endif /* __MEDIA_VISION_UTIL_RENDER_2D_H__ */