2015-07-12 02:23:27 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2017-01-22 12:40:32 +00:00
|
|
|
* copyright (c) 2011-2017 - Daniel De Matteis
|
2017-12-12 07:55:31 +00:00
|
|
|
*
|
2015-07-12 02:23:27 +00:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2016-03-05 06:27:48 +00:00
|
|
|
#ifndef __VIDEO_COORD_ARRAY_H
|
|
|
|
#define __VIDEO_COORD_ARRAY_H
|
2015-07-12 02:23:27 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2015-07-12 03:30:04 +00:00
|
|
|
#include <boolean.h>
|
2016-06-03 03:43:49 +00:00
|
|
|
#include <retro_common_api.h>
|
2015-07-12 03:30:04 +00:00
|
|
|
|
2016-06-03 03:43:49 +00:00
|
|
|
RETRO_BEGIN_DECLS
|
2015-07-12 06:08:27 +00:00
|
|
|
|
2016-05-10 00:34:36 +00:00
|
|
|
struct video_fbo_rect
|
2015-07-12 02:23:27 +00:00
|
|
|
{
|
|
|
|
unsigned img_width;
|
|
|
|
unsigned img_height;
|
|
|
|
unsigned max_img_width;
|
|
|
|
unsigned max_img_height;
|
|
|
|
unsigned width;
|
|
|
|
unsigned height;
|
|
|
|
};
|
|
|
|
|
2016-05-10 00:39:09 +00:00
|
|
|
struct video_ortho
|
2015-07-12 02:23:27 +00:00
|
|
|
{
|
|
|
|
float left;
|
|
|
|
float right;
|
|
|
|
float bottom;
|
|
|
|
float top;
|
|
|
|
float znear;
|
|
|
|
float zfar;
|
|
|
|
};
|
|
|
|
|
2016-05-10 00:39:09 +00:00
|
|
|
struct video_tex_info
|
2015-07-12 02:23:27 +00:00
|
|
|
{
|
|
|
|
unsigned int tex;
|
|
|
|
float input_size[2];
|
|
|
|
float tex_size[2];
|
|
|
|
float coord[8];
|
|
|
|
};
|
|
|
|
|
2016-05-10 00:32:49 +00:00
|
|
|
typedef struct video_coords
|
2015-07-12 02:23:27 +00:00
|
|
|
{
|
|
|
|
const float *vertex;
|
|
|
|
const float *color;
|
|
|
|
const float *tex_coord;
|
|
|
|
const float *lut_tex_coord;
|
2016-04-17 18:05:27 +00:00
|
|
|
const unsigned *index;
|
2020-08-14 16:36:09 +00:00
|
|
|
unsigned vertices;
|
2016-04-17 23:52:16 +00:00
|
|
|
unsigned indexes;
|
2016-05-10 00:32:49 +00:00
|
|
|
} video_coords_t;
|
2015-07-12 02:23:27 +00:00
|
|
|
|
2016-05-10 00:42:52 +00:00
|
|
|
typedef struct video_mut_coords
|
2015-07-12 02:23:27 +00:00
|
|
|
{
|
|
|
|
float *vertex;
|
|
|
|
float *color;
|
|
|
|
float *tex_coord;
|
|
|
|
float *lut_tex_coord;
|
2016-04-17 23:52:16 +00:00
|
|
|
unsigned *index;
|
2020-08-14 22:35:15 +00:00
|
|
|
unsigned vertices;
|
2016-04-17 23:52:16 +00:00
|
|
|
unsigned indexes;
|
2016-05-10 00:42:52 +00:00
|
|
|
} video_mut_coords_t;
|
2015-07-12 02:23:27 +00:00
|
|
|
|
2016-05-10 00:32:49 +00:00
|
|
|
typedef struct video_coord_array
|
2015-07-12 02:23:27 +00:00
|
|
|
{
|
2020-08-14 16:36:09 +00:00
|
|
|
video_mut_coords_t coords; /* ptr alignment */
|
2015-07-12 02:23:27 +00:00
|
|
|
unsigned allocated;
|
2016-05-10 00:32:49 +00:00
|
|
|
} video_coord_array_t;
|
2015-07-12 02:23:27 +00:00
|
|
|
|
2016-05-10 00:42:02 +00:00
|
|
|
typedef struct video_font_raster_block
|
2015-07-12 02:23:27 +00:00
|
|
|
{
|
2020-08-14 16:36:09 +00:00
|
|
|
video_coord_array_t carr; /* ptr alignment */
|
2015-07-12 02:23:27 +00:00
|
|
|
bool fullscreen;
|
2016-05-10 00:42:02 +00:00
|
|
|
} video_font_raster_block_t;
|
2015-07-12 02:23:27 +00:00
|
|
|
|
2016-05-10 00:32:49 +00:00
|
|
|
bool video_coord_array_append(video_coord_array_t *ca,
|
|
|
|
const video_coords_t *coords, unsigned count);
|
2015-07-12 03:30:04 +00:00
|
|
|
|
2016-05-10 00:32:49 +00:00
|
|
|
void video_coord_array_free(video_coord_array_t *ca);
|
2015-07-12 03:30:04 +00:00
|
|
|
|
2016-06-03 03:43:49 +00:00
|
|
|
RETRO_END_DECLS
|
2015-07-12 06:08:27 +00:00
|
|
|
|
2015-07-12 02:23:27 +00:00
|
|
|
#endif
|