mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
Update gl_common.c - update CHANGES.md
This commit is contained in:
parent
1e7701bf29
commit
57089dc108
@ -17,6 +17,8 @@ default font
|
||||
- VIDEO: Fix threaded video regression; tickering of menu entries would no longer work.
|
||||
- LOBBIES: Fallback to filename based matching if no CRC matches are found (for people making playlists by hand)
|
||||
- VITA: Fix slow I/O
|
||||
- VITA: Fix 30fps menu (poke into input now instead of reading the entire input buffer which apparently is slow)
|
||||
- VITA: Fix frame throttle
|
||||
- VULKAN: Fix some crashes on loading some thumbnails
|
||||
|
||||
# 1.5.0
|
||||
|
@ -24,36 +24,6 @@
|
||||
#include "../drivers/gl_symlinks.h"
|
||||
#include "../video_coord_array.h"
|
||||
|
||||
void gl_ff_vertex(const struct video_coords *coords)
|
||||
{
|
||||
#ifndef NO_GL_FF_VERTEX
|
||||
/* Fall back to fixed function-style if needed and possible. */
|
||||
glClientActiveTexture(GL_TEXTURE1);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, coords->lut_tex_coord);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glClientActiveTexture(GL_TEXTURE0);
|
||||
glVertexPointer(2, GL_FLOAT, 0, coords->vertex);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glColorPointer(4, GL_FLOAT, 0, coords->color);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, coords->tex_coord);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
#endif
|
||||
}
|
||||
|
||||
void gl_ff_matrix(const math_matrix_4x4 *mat)
|
||||
{
|
||||
#ifndef NO_GL_FF_MATRIX
|
||||
math_matrix_4x4 ident;
|
||||
|
||||
/* Fall back to fixed function-style if needed and possible. */
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadMatrixf(mat->data);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
matrix_4x4_identity(ident);
|
||||
glLoadMatrixf(ident.data);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gl_size_format(GLint* internalFormat)
|
||||
{
|
||||
|
@ -155,6 +155,41 @@ typedef struct gl
|
||||
bool gl_load_luts(const struct video_shader *generic_shader,
|
||||
GLuint *lut_textures);
|
||||
|
||||
#ifdef NO_GL_FF_VERTEX
|
||||
#define gl_ff_vertex(coords) ((void)0)
|
||||
#else
|
||||
static INLINE void gl_ff_vertex(const struct video_coords *coords)
|
||||
{
|
||||
/* Fall back to fixed function-style if needed and possible. */
|
||||
glClientActiveTexture(GL_TEXTURE1);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, coords->lut_tex_coord);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glClientActiveTexture(GL_TEXTURE0);
|
||||
glVertexPointer(2, GL_FLOAT, 0, coords->vertex);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glColorPointer(4, GL_FLOAT, 0, coords->color);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, coords->tex_coord);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NO_GL_FF_MATRIX
|
||||
#define gl_ff_matrix(mat) ((void)0)
|
||||
#else
|
||||
static INLINE void gl_ff_matrix(const math_matrix_4x4 *mat)
|
||||
{
|
||||
math_matrix_4x4 ident;
|
||||
|
||||
/* Fall back to fixed function-style if needed and possible. */
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadMatrixf(mat->data);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
matrix_4x4_identity(ident);
|
||||
glLoadMatrixf(ident.data);
|
||||
}
|
||||
#endif
|
||||
|
||||
static INLINE unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type)
|
||||
{
|
||||
switch (type)
|
||||
@ -176,9 +211,8 @@ static INLINE unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bool gl_query_core_context_in_use(void);
|
||||
void gl_ff_vertex(const struct video_coords *coords);
|
||||
void gl_ff_matrix(const math_matrix_4x4 *mat);
|
||||
void gl_load_texture_image(GLenum target,
|
||||
GLint level,
|
||||
GLint internalFormat,
|
||||
|
@ -261,14 +261,13 @@ static bool gl_cg_set_mvp(void *data, void *shader_data, const math_matrix_4x4 *
|
||||
{
|
||||
cg_shader_data_t *cg = (cg_shader_data_t*)shader_data;
|
||||
if (!cg || !cg->prg[cg->active_idx].mvp)
|
||||
goto fallback;
|
||||
{
|
||||
gl_ff_matrix(mat);
|
||||
return false;
|
||||
}
|
||||
|
||||
cgGLSetMatrixParameterfc(cg->prg[cg->active_idx].mvp, mat->data);
|
||||
return true;
|
||||
|
||||
fallback:
|
||||
gl_ff_matrix(mat);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool gl_cg_set_coords(void *handle_data, void *shader_data, const struct video_coords *coords)
|
||||
|
@ -1379,7 +1379,10 @@ static bool gl_glsl_set_mvp(void *data, void *shader_data, const math_matrix_4x4
|
||||
(void)data;
|
||||
|
||||
if (!glsl || !glsl->shader->modern)
|
||||
goto fallback;
|
||||
{
|
||||
gl_ff_matrix(mat);
|
||||
return false;
|
||||
}
|
||||
|
||||
loc = glsl->uniforms[glsl->active_idx].mvp;
|
||||
if (loc >= 0)
|
||||
@ -1394,11 +1397,8 @@ static bool gl_glsl_set_mvp(void *data, void *shader_data, const math_matrix_4x4
|
||||
current_mat_data[glsl->active_idx] = *mat->data;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
fallback:
|
||||
gl_ff_matrix(mat);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
#define gl_glsl_set_coord_array(attribs, coord1, coord2, coords, size, multiplier) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user