RetroArch
video_coord_array.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * copyright (c) 2011-2017 - Daniel De Matteis
4  *
5  * RetroArch is free software: you can redistribute it and/or modify it under the terms
6  * of the GNU General Public License as published by the Free Software Found-
7  * ation, either version 3 of the License, or (at your option) any later version.
8  *
9  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with RetroArch.
14  * If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef __VIDEO_COORD_ARRAY_H
18 #define __VIDEO_COORD_ARRAY_H
19 
20 #include <stdint.h>
21 #include <string.h>
22 
23 #include <boolean.h>
24 #include <retro_common_api.h>
25 
27 
29 {
30  unsigned img_width;
31  unsigned img_height;
32  unsigned max_img_width;
33  unsigned max_img_height;
34  unsigned width;
35  unsigned height;
36 };
37 
39 {
40  float left;
41  float right;
42  float bottom;
43  float top;
44  float znear;
45  float zfar;
46 };
47 
49 {
50  unsigned int tex;
51  float input_size[2];
52  float tex_size[2];
53  float coord[8];
54 };
55 
56 typedef struct video_coords
57 {
58  const float *vertex;
59  const float *color;
60  const float *tex_coord;
61  const float *lut_tex_coord;
62  unsigned vertices;
63  const unsigned *index;
64  unsigned indexes;
66 
67 typedef struct video_mut_coords
68 {
69  float *vertex;
70  float *color;
71  float *tex_coord;
72  float *lut_tex_coord;
73  unsigned vertices;
74  unsigned *index;
75  unsigned indexes;
77 
78 typedef struct video_coord_array
79 {
81  unsigned allocated;
83 
85 {
86  bool fullscreen;
89 
91  const video_coords_t *coords, unsigned count);
92 
94 
96 
97 #endif
bool video_coord_array_append(video_coord_array_t *ca, const video_coords_t *coords, unsigned count)
Definition: video_coord_array.c:62
float * tex_coord
Definition: video_coord_array.h:71
float top
Definition: video_coord_array.h:43
Definition: video_coord_array.h:28
unsigned * index
Definition: video_coord_array.h:74
video_mut_coords_t coords
Definition: video_coord_array.h:80
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
struct video_mut_coords video_mut_coords_t
Definition: video_coord_array.h:78
unsigned height
Definition: video_coord_array.h:35
struct video_coord_array video_coord_array_t
unsigned img_height
Definition: video_coord_array.h:31
struct video_font_raster_block video_font_raster_block_t
unsigned int tex
Definition: video_coord_array.h:50
float left
Definition: video_coord_array.h:40
Definition: video_coord_array.h:48
GLuint GLuint GLsizei count
Definition: glext.h:6292
unsigned indexes
Definition: video_coord_array.h:64
unsigned allocated
Definition: video_coord_array.h:81
GLuint coords
Definition: glext.h:8035
unsigned max_img_width
Definition: video_coord_array.h:32
Definition: video_coord_array.h:67
unsigned img_width
Definition: video_coord_array.h:30
Definition: video_coord_array.h:38
unsigned vertices
Definition: video_coord_array.h:73
GLuint coord
Definition: glext.h:10418
unsigned vertices
Definition: video_coord_array.h:62
Definition: video_coord_array.h:84
video_coord_array_t carr
Definition: video_coord_array.h:87
Definition: video_coord_array.h:56
bool fullscreen
Definition: video_coord_array.h:86
float * color
Definition: video_coord_array.h:70
const unsigned * index
Definition: video_coord_array.h:63
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
const float * color
Definition: video_coord_array.h:59
float * lut_tex_coord
Definition: video_coord_array.h:72
unsigned max_img_height
Definition: video_coord_array.h:33
float tex_size[2]
Definition: video_coord_array.h:52
const float * tex_coord
Definition: video_coord_array.h:60
struct video_coords video_coords_t
float bottom
Definition: video_coord_array.h:42
float right
Definition: video_coord_array.h:41
unsigned width
Definition: video_coord_array.h:34
void video_coord_array_free(video_coord_array_t *ca)
Definition: video_coord_array.c:97
float zfar
Definition: video_coord_array.h:45
float znear
Definition: video_coord_array.h:44
const float * lut_tex_coord
Definition: video_coord_array.h:61
const float * vertex
Definition: video_coord_array.h:58
unsigned indexes
Definition: video_coord_array.h:75
float * vertex
Definition: video_coord_array.h:69
float input_size[2]
Definition: video_coord_array.h:51