RetroArch/gfx/video_coord_array.h

101 lines
2.1 KiB
C
Raw Normal View History

2015-07-12 04:23:27 +02:00
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
2016-01-10 04:41:52 +01:00
* copyright (c) 2011-2016 - Daniel De Matteis
2015-07-12 04:23:27 +02: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 07:27:48 +01:00
#ifndef __VIDEO_COORD_ARRAY_H
#define __VIDEO_COORD_ARRAY_H
2015-07-12 04:23:27 +02:00
#include <stdint.h>
#include <string.h>
2015-07-12 05:30:04 +02:00
#include <boolean.h>
2015-07-12 08:08:27 +02:00
#ifdef __cplusplus
extern "C" {
#endif
2016-05-10 02:34:36 +02:00
struct video_fbo_rect
2015-07-12 04:23:27 +02:00
{
unsigned img_width;
unsigned img_height;
unsigned max_img_width;
unsigned max_img_height;
unsigned width;
unsigned height;
};
2016-05-10 02:39:09 +02:00
struct video_ortho
2015-07-12 04:23:27 +02:00
{
float left;
float right;
float bottom;
float top;
float znear;
float zfar;
};
2016-05-10 02:39:09 +02:00
struct video_tex_info
2015-07-12 04:23:27 +02:00
{
unsigned int tex;
float input_size[2];
float tex_size[2];
float coord[8];
};
2016-05-10 02:32:49 +02:00
typedef struct video_coords
2015-07-12 04:23:27 +02:00
{
const float *vertex;
const float *color;
const float *tex_coord;
const float *lut_tex_coord;
unsigned vertices;
const unsigned *index;
2016-04-18 01:52:16 +02:00
unsigned indexes;
2016-05-10 02:32:49 +02:00
} video_coords_t;
2015-07-12 04:23:27 +02:00
typedef struct gfx_mut_coords
{
float *vertex;
float *color;
float *tex_coord;
float *lut_tex_coord;
unsigned vertices;
2016-04-18 01:52:16 +02:00
unsigned *index;
unsigned indexes;
2015-07-12 04:23:27 +02:00
} gfx_mut_coords_t;
2016-05-10 02:32:49 +02:00
typedef struct video_coord_array
2015-07-12 04:23:27 +02:00
{
gfx_mut_coords_t coords;
unsigned allocated;
2016-05-10 02:32:49 +02:00
} video_coord_array_t;
2015-07-12 04:23:27 +02:00
typedef struct gfx_raster_block
{
bool fullscreen;
2016-05-10 02:32:49 +02:00
video_coord_array_t carr;
2015-07-12 04:23:27 +02:00
} gfx_font_raster_block_t;
2016-05-10 02:32:49 +02:00
bool video_coord_array_append(video_coord_array_t *ca,
const video_coords_t *coords, unsigned count);
2015-07-12 05:30:04 +02:00
2016-05-10 02:32:49 +02:00
void video_coord_array_free(video_coord_array_t *ca);
2015-07-12 05:30:04 +02:00
2015-07-12 08:08:27 +02:00
#ifdef __cplusplus
}
#endif
2015-07-12 04:23:27 +02:00
#endif