RetroArch
Classes | Macros | Typedefs | Functions
gl_common.h File Reference
#include <boolean.h>
#include <string.h>
#include <libretro.h>
#include <retro_common_api.h>
#include <retro_inline.h>
#include <gfx/math/matrix_4x4.h>
#include <gfx/scaler/scaler.h>
#include <formats/image.h>
#include "../../verbosity.h"
#include "../font_driver.h"
#include "../video_coord_array.h"
#include "../video_driver.h"
#include <glsym/glsym.h>
Include dependency graph for gl_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gl_renderchain_driver
 
struct  gl
 

Macros

#define RARCH_GL_FRAMEBUFFER   GL_FRAMEBUFFER
 
#define RARCH_GL_FRAMEBUFFER_COMPLETE   GL_FRAMEBUFFER_COMPLETE
 
#define RARCH_GL_COLOR_ATTACHMENT0   GL_COLOR_ATTACHMENT0
 
#define RARCH_GL_RENDERBUFFER   GL_RENDERBUFFER
 
#define RARCH_GL_DEPTH24_STENCIL8   GL_DEPTH24_STENCIL8
 
#define RARCH_GL_DEPTH_ATTACHMENT   GL_DEPTH_ATTACHMENT
 
#define RARCH_GL_STENCIL_ATTACHMENT   GL_STENCIL_ATTACHMENT
 
#define RARCH_GL_MAX_RENDERBUFFER_SIZE   GL_MAX_RENDERBUFFER_SIZE
 
#define RARCH_GL_INTERNAL_FORMAT32   GL_RGBA8
 
#define RARCH_GL_INTERNAL_FORMAT16   GL_RGBA8
 
#define RARCH_GL_TEXTURE_TYPE32   GL_BGRA
 
#define RARCH_GL_TEXTURE_TYPE16   GL_BGRA
 
#define RARCH_GL_FORMAT32   GL_UNSIGNED_INT_8_8_8_8_REV
 
#define RARCH_GL_FORMAT16   GL_UNSIGNED_INT_8_8_8_8_REV
 
#define GL_RGB565   0x8D62
 
#define RARCH_GL_INTERNAL_FORMAT16_565   GL_RGB565
 
#define RARCH_GL_TEXTURE_TYPE16_565   GL_RGB
 
#define RARCH_GL_FORMAT16_565   GL_UNSIGNED_SHORT_5_6_5
 

Typedefs

typedef struct gl gl_t
 
typedef struct gl_renderchain_driver gl_renderchain_driver_t
 

Functions

static INLINE void gl_bind_texture (GLuint id, GLint wrap_mode, GLint mag_filter, GLint min_filter)
 
static INLINE unsigned gl_wrap_type_to_enum (enum gfx_wrap_type type)
 
bool gl_query_core_context_in_use (void)
 
void gl_load_texture_image (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *data)
 
void gl_load_texture_data (uint32_t id_data, enum gfx_wrap_type wrap_type, enum texture_filter_type filter_type, unsigned alignment, unsigned width, unsigned height, const void *frame, unsigned base_size)
 
static INLINE GLenum gl_min_filter_to_mag (GLenum type)
 
static INLINE bool gl_set_core_context (enum retro_hw_context_type ctx_type)
 

Macro Definition Documentation

◆ GL_RGB565

#define GL_RGB565   0x8D62

◆ RARCH_GL_COLOR_ATTACHMENT0

#define RARCH_GL_COLOR_ATTACHMENT0   GL_COLOR_ATTACHMENT0

◆ RARCH_GL_DEPTH24_STENCIL8

#define RARCH_GL_DEPTH24_STENCIL8   GL_DEPTH24_STENCIL8

◆ RARCH_GL_DEPTH_ATTACHMENT

#define RARCH_GL_DEPTH_ATTACHMENT   GL_DEPTH_ATTACHMENT

◆ RARCH_GL_FORMAT16

#define RARCH_GL_FORMAT16   GL_UNSIGNED_INT_8_8_8_8_REV

◆ RARCH_GL_FORMAT16_565

#define RARCH_GL_FORMAT16_565   GL_UNSIGNED_SHORT_5_6_5

◆ RARCH_GL_FORMAT32

#define RARCH_GL_FORMAT32   GL_UNSIGNED_INT_8_8_8_8_REV

◆ RARCH_GL_FRAMEBUFFER

#define RARCH_GL_FRAMEBUFFER   GL_FRAMEBUFFER

◆ RARCH_GL_FRAMEBUFFER_COMPLETE

#define RARCH_GL_FRAMEBUFFER_COMPLETE   GL_FRAMEBUFFER_COMPLETE

◆ RARCH_GL_INTERNAL_FORMAT16

#define RARCH_GL_INTERNAL_FORMAT16   GL_RGBA8

◆ RARCH_GL_INTERNAL_FORMAT16_565

#define RARCH_GL_INTERNAL_FORMAT16_565   GL_RGB565

◆ RARCH_GL_INTERNAL_FORMAT32

#define RARCH_GL_INTERNAL_FORMAT32   GL_RGBA8

◆ RARCH_GL_MAX_RENDERBUFFER_SIZE

#define RARCH_GL_MAX_RENDERBUFFER_SIZE   GL_MAX_RENDERBUFFER_SIZE

◆ RARCH_GL_RENDERBUFFER

#define RARCH_GL_RENDERBUFFER   GL_RENDERBUFFER

◆ RARCH_GL_STENCIL_ATTACHMENT

#define RARCH_GL_STENCIL_ATTACHMENT   GL_STENCIL_ATTACHMENT

◆ RARCH_GL_TEXTURE_TYPE16

#define RARCH_GL_TEXTURE_TYPE16   GL_BGRA

◆ RARCH_GL_TEXTURE_TYPE16_565

#define RARCH_GL_TEXTURE_TYPE16_565   GL_RGB

◆ RARCH_GL_TEXTURE_TYPE32

#define RARCH_GL_TEXTURE_TYPE32   GL_BGRA

Typedef Documentation

◆ gl_renderchain_driver_t

◆ gl_t

typedef struct gl gl_t

Function Documentation

◆ gl_bind_texture()

static INLINE void gl_bind_texture ( GLuint  id,
GLint  wrap_mode,
GLint  mag_filter,
GLint  min_filter 
)
static
Here is the caller graph for this function:

◆ gl_load_texture_data()

void gl_load_texture_data ( uint32_t  id_data,
enum gfx_wrap_type  wrap_type,
enum texture_filter_type  filter_type,
unsigned  alignment,
unsigned  width,
unsigned  height,
const void frame,
unsigned  base_size 
)
Here is the caller graph for this function:

◆ gl_load_texture_image()

void gl_load_texture_image ( GLenum  target,
GLint  level,
GLint  internalFormat,
GLsizei  width,
GLsizei  height,
GLint  border,
GLenum  format,
GLenum  type,
const GLvoid data 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gl_min_filter_to_mag()

static INLINE GLenum gl_min_filter_to_mag ( GLenum  type)
static
Here is the caller graph for this function:

◆ gl_query_core_context_in_use()

bool gl_query_core_context_in_use ( void  )
Here is the caller graph for this function:

◆ gl_set_core_context()

static INLINE bool gl_set_core_context ( enum retro_hw_context_type  ctx_type)
static

Ensure that the rest of the frontend knows we have a core context

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gl_wrap_type_to_enum()

static INLINE unsigned gl_wrap_type_to_enum ( enum gfx_wrap_type  type)
static
Here is the caller graph for this function: