RetroArch
image.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2018 The RetroArch team
2  *
3  * ---------------------------------------------------------------------------------------
4  * The following license statement only applies to this file (image.h).
5  * ---------------------------------------------------------------------------------------
6  *
7  * Permission is hereby granted, free of charge,
8  * to any person obtaining a copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation the rights to
10  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
11  * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef __RARCH_IMAGE_CONTEXT_H
24 #define __RARCH_IMAGE_CONTEXT_H
25 
26 #include <stdint.h>
27 
28 #include <retro_common_api.h>
29 
30 #include <boolean.h>
31 
33 
35 {
40 };
41 
43 {
44  unsigned width;
45  unsigned height;
48 };
49 
51 {
57 };
58 
59 bool image_texture_set_color_shifts(unsigned *r_shift, unsigned *g_shift,
60  unsigned *b_shift, unsigned *a_shift,
61  struct texture_image *out_img);
62 
63 bool image_texture_color_convert(unsigned r_shift,
64  unsigned g_shift, unsigned b_shift, unsigned a_shift,
65  struct texture_image *out_img);
66 
67 bool image_texture_load(struct texture_image *img, const char *path);
69 
70 /* Image transfer */
71 
73 
75 
77 
79  void *data,
80  enum image_type_enum type,
81  void *ptr);
82 
84  void *data,
85  enum image_type_enum type,
86  uint32_t **buf, size_t size,
87  unsigned *width, unsigned *height);
88 
90 
92 
94 
95 #endif
void image_texture_free(struct texture_image *img)
Definition: image_texture.c:206
const GLvoid * ptr
Definition: nx_glsym.h:242
image_type_enum
Definition: image.h:50
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
bool image_texture_load(struct texture_image *img, const char *path)
Definition: image_texture.c:267
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
bool image_texture_set_color_shifts(unsigned *r_shift, unsigned *g_shift, unsigned *b_shift, unsigned *a_shift, struct texture_image *out_img)
Definition: image_texture.c:41
GLsizei const GLchar ** path
Definition: glext.h:7901
Definition: image.h:36
GLsizeiptr size
Definition: glext.h:6559
Definition: image.h:38
image_process_code
Definition: image.h:34
Definition: ibxm.h:9
Definition: image.h:54
bool supports_rgba
Definition: image.h:47
GLint GLvoid * img
Definition: glext.h:6388
uint32_t * pixels
Definition: image.h:46
Definition: image.h:55
GLenum type
Definition: glext.h:6233
void image_transfer_set_buffer_ptr(void *data, enum image_type_enum type, void *ptr)
Definition: image_transfer.c:177
unsigned height
Definition: image.h:45
bool image_transfer_start(void *data, enum image_type_enum type)
Definition: image_transfer.c:110
int image_transfer_process(void *data, enum image_type_enum type, uint32_t **buf, size_t size, unsigned *width, unsigned *height)
Definition: image_transfer.c:209
Definition: image.h:53
Definition: image.h:56
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
Definition: image.h:39
Definition: image.h:37
void * image_transfer_new(enum image_type_enum type)
Definition: image_transfer.c:75
GLint GLint GLsizei width
Definition: glext.h:6293
Definition: image.h:42
Definition: image.h:52
bool image_transfer_is_valid(void *data, enum image_type_enum type)
Definition: image_transfer.c:144
bool image_texture_color_convert(unsigned r_shift, unsigned g_shift, unsigned b_shift, unsigned a_shift, struct texture_image *out_img)
Definition: image_texture.c:62
void image_transfer_free(void *data, enum image_type_enum type)
Definition: image_transfer.c:42
unsigned width
Definition: image.h:44
bool image_transfer_iterate(void *data, enum image_type_enum type)
Definition: image_transfer.c:256
unsigned int uint32_t
Definition: stdint.h:126
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293