mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
(GL2) Simplifications
This commit is contained in:
parent
819016b00c
commit
7c93da1360
@ -267,13 +267,6 @@ static bool gl2_shader_scale(gl_t *gl,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *gl2_shader_get_ident(gl_t *gl)
|
|
||||||
{
|
|
||||||
if (!gl || !gl->shader)
|
|
||||||
return "N/A";
|
|
||||||
return gl->shader->ident;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gl2_renderchain_convert_geometry(
|
static void gl2_renderchain_convert_geometry(
|
||||||
struct video_fbo_rect *fbo_rect,
|
struct video_fbo_rect *fbo_rect,
|
||||||
struct gfx_fbo_scale *fbo_scale,
|
struct gfx_fbo_scale *fbo_scale,
|
||||||
@ -1610,28 +1603,15 @@ static void gl2_renderchain_copy_frame(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl2_renderchain_bind_pbo(unsigned idx)
|
|
||||||
{
|
|
||||||
#if !defined(HAVE_OPENGLES2) && !defined(HAVE_PSGL)
|
#if !defined(HAVE_OPENGLES2) && !defined(HAVE_PSGL)
|
||||||
glBindBuffer(GL_PIXEL_PACK_BUFFER, (GLuint)idx);
|
#define gl2_renderchain_bind_pbo(idx) glBindBuffer(GL_PIXEL_PACK_BUFFER, (GLuint)idx)
|
||||||
|
#define gl2_renderchain_unbind_pbo() glBindBuffer(GL_PIXEL_PACK_BUFFER, 0)
|
||||||
|
#define gl2_renderchain_init_pbo(size, data) glBufferData(GL_PIXEL_PACK_BUFFER, size, (const GLvoid*)data, GL_STREAM_READ)
|
||||||
|
#else
|
||||||
|
#define gl2_renderchain_bind_pbo(idx)
|
||||||
|
#define gl2_renderchain_unbind_pbo()
|
||||||
|
#define gl2_renderchain_init_pbo(size, data)
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
static void gl2_renderchain_unbind_pbo(void)
|
|
||||||
{
|
|
||||||
#if !defined(HAVE_OPENGLES2) && !defined(HAVE_PSGL)
|
|
||||||
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gl2_renderchain_init_pbo(unsigned size,
|
|
||||||
const void *data)
|
|
||||||
{
|
|
||||||
#if !defined(HAVE_OPENGLES2) && !defined(HAVE_PSGL)
|
|
||||||
glBufferData(GL_PIXEL_PACK_BUFFER, size,
|
|
||||||
(const GLvoid*)data, GL_STREAM_READ);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gl2_renderchain_readback(
|
static void gl2_renderchain_readback(
|
||||||
gl_t *gl,
|
gl_t *gl,
|
||||||
@ -3494,9 +3474,7 @@ static void *gl2_init(const video_info_t *video,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
gl2_shader_get_ident(gl);
|
RARCH_LOG("[GL]: Default shader backend found: %s.\n", gl->shader->ident);
|
||||||
|
|
||||||
RARCH_LOG("[GL]: Default shader backend found: %s.\n", gl2_shader_get_ident(gl));
|
|
||||||
|
|
||||||
if (!gl2_shader_init(gl, ctx_driver, hwr))
|
if (!gl2_shader_init(gl, ctx_driver, hwr))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user