mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
No more GL_FF_MATRIX/GL_FF_VERTEX
This commit is contained in:
parent
a5076df751
commit
b6b6ba9226
@ -142,18 +142,6 @@
|
||||
#define RARCH_GL_FORMAT16_565 GL_UNSIGNED_SHORT_5_6_5
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL_MODERN) || defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES3) || defined(HAVE_OPENGLES_3_1) || defined(HAVE_OPENGLES_3_2) || defined(HAVE_PSGL)
|
||||
|
||||
#ifndef NO_GL_FF_VERTEX
|
||||
#define NO_GL_FF_VERTEX
|
||||
#endif
|
||||
|
||||
#ifndef NO_GL_FF_MATRIX
|
||||
#define NO_GL_FF_MATRIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGLES2) /* TODO: Figure out exactly what. */
|
||||
#define NO_GL_CLAMP_TO_BORDER
|
||||
#endif
|
||||
|
@ -1103,54 +1103,6 @@ static void *gl2_renderchain_new(void)
|
||||
return renderchain;
|
||||
}
|
||||
|
||||
#ifndef NO_GL_FF_VERTEX
|
||||
static void gl2_renderchain_ff_vertex(const void *data)
|
||||
{
|
||||
const struct video_coords *coords = (const struct video_coords*)data;
|
||||
/* 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
|
||||
|
||||
#ifndef NO_GL_FF_MATRIX
|
||||
static void gl2_renderchain_ff_matrix(const void *data)
|
||||
{
|
||||
math_matrix_4x4 ident;
|
||||
const math_matrix_4x4 *mat = (const math_matrix_4x4*)data;
|
||||
|
||||
/* 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
|
||||
|
||||
#ifndef NO_GL_FF_VERTEX
|
||||
static void gl2_renderchain_disable_client_arrays(void)
|
||||
{
|
||||
if (gl_query_core_context_in_use())
|
||||
return;
|
||||
|
||||
glClientActiveTexture(GL_TEXTURE1);
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glClientActiveTexture(GL_TEXTURE0);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_OPENGLES
|
||||
static void gl2_renderchain_bind_vao(void *data)
|
||||
{
|
||||
@ -1470,18 +1422,9 @@ gl_renderchain_driver_t gl2_renderchain = {
|
||||
gl2_renderchain_bind_vao,
|
||||
gl2_renderchain_unbind_vao,
|
||||
#endif
|
||||
#ifdef NO_GL_FF_VERTEX
|
||||
NULL,
|
||||
NULL,
|
||||
#else
|
||||
gl2_renderchain_disable_client_arrays,
|
||||
gl2_renderchain_ff_vertex,
|
||||
#endif
|
||||
#ifdef NO_GL_FF_MATRIX
|
||||
NULL,
|
||||
#else
|
||||
gl2_renderchain_ff_matrix,
|
||||
#endif
|
||||
gl2_renderchain_bind_backbuffer,
|
||||
gl2_renderchain_deinit_fbo,
|
||||
gl2_renderchain_viewport_info,
|
||||
|
Loading…
Reference in New Issue
Block a user