mirror of
https://github.com/libretro/RetroArch
synced 2025-01-25 15:35:29 +00:00
Fixup build for PC.
This commit is contained in:
parent
655006984e
commit
df69517d79
24
gfx/gl.c
24
gfx/gl.c
@ -61,11 +61,9 @@
|
||||
#define NO_GL_CLAMP_TO_BORDER
|
||||
#endif
|
||||
|
||||
// FIXME: Support GL_TRIANGLE_STRIP in RGL.
|
||||
#if defined(HAVE_PSGL)
|
||||
|
||||
#ifndef GL_RENDER_MODE
|
||||
#define GL_RENDER_MODE GL_QUADS
|
||||
#endif
|
||||
#define VERTEX_RENDER_MODE GL_QUADS
|
||||
|
||||
// Used for the last pass when rendering to the back buffer.
|
||||
const GLfloat vertexes_flipped[] = {
|
||||
@ -100,11 +98,7 @@ static inline void set_texture_coords(GLfloat *coords, GLfloat xamt, GLfloat yam
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#ifndef GL_RENDER_MODE
|
||||
#define GL_RENDER_MODE GL_TRIANGLE_STRIP
|
||||
#endif
|
||||
|
||||
#define VERTEX_RENDER_MODE GL_TRIANGLE_STRIP
|
||||
// Used for the last pass when rendering to the back buffer.
|
||||
const GLfloat vertexes_flipped[] = {
|
||||
0, 1,
|
||||
@ -133,11 +127,9 @@ static inline void set_texture_coords(GLfloat *coords, GLfloat xamt, GLfloat yam
|
||||
{
|
||||
coords[2] = xamt;
|
||||
coords[6] = xamt;
|
||||
|
||||
coords[5] = yamt;
|
||||
coords[7] = yamt;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
const GLfloat white_color[] = {
|
||||
@ -806,7 +798,7 @@ static void gl_frame_fbo(gl_t *gl, const struct gl_tex_info *tex_info)
|
||||
tex_info, gl->prev_info, fbo_tex_info, fbo_tex_info_cnt);
|
||||
|
||||
gl_shader_set_coords(&gl->coords, &gl->mvp);
|
||||
glDrawArrays(GL_RENDER_MODE, 0, 4);
|
||||
glDrawArrays(VERTEX_RENDER_MODE, 0, 4);
|
||||
|
||||
fbo_tex_info_cnt++;
|
||||
}
|
||||
@ -835,7 +827,7 @@ static void gl_frame_fbo(gl_t *gl, const struct gl_tex_info *tex_info)
|
||||
gl->coords.vertex = vertex_ptr;
|
||||
|
||||
gl_shader_set_coords(&gl->coords, &gl->mvp);
|
||||
glDrawArrays(GL_RENDER_MODE, 0, 4);
|
||||
glDrawArrays(VERTEX_RENDER_MODE, 0, 4);
|
||||
|
||||
gl->coords.tex_coord = gl->tex_coords;
|
||||
}
|
||||
@ -1080,7 +1072,7 @@ static void gl_render_menu(gl_t *gl)
|
||||
gl->coords.vertex = default_vertex_ptr;
|
||||
|
||||
gl_shader_set_coords(&gl->coords, &gl->mvp);
|
||||
glDrawArrays(GL_RENDER_MODE, 0, 4);
|
||||
glDrawArrays(VERTEX_RENDER_MODE, 0, 4);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
}
|
||||
@ -1138,7 +1130,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
||||
&tex_info, gl->prev_info, NULL, 0);
|
||||
|
||||
gl_shader_set_coords(&gl->coords, &gl->mvp);
|
||||
glDrawArrays(GL_RENDER_MODE, 0, 4);
|
||||
glDrawArrays(VERTEX_RENDER_MODE, 0, 4);
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
if (gl->fbo_inited)
|
||||
@ -1244,7 +1236,7 @@ static bool resolve_extensions(gl_t *gl)
|
||||
gl->border_type = GL_CLAMP_TO_BORDER;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PBO) && defined(ANDROID)
|
||||
#if defined(HAVE_PBO)
|
||||
RARCH_LOG("[GL]: Using PBOs.\n");
|
||||
if (!gl_query_extension("GL_ARB_pixel_buffer_object"))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user