More buildfixes

This commit is contained in:
twinaphex 2017-11-08 00:55:38 +01:00
parent 97e0ffde9f
commit e7599e8952

View File

@ -67,16 +67,16 @@ typedef struct gl2_renderchain
/* Prototypes */ /* Prototypes */
#define gl_bind_fb(id) glBindFramebuffer(RARCH_GL_FRAMEBUFFER, id) #define gl2_bind_fb(id) glBindFramebuffer(RARCH_GL_FRAMEBUFFER, id)
static INLINE void gl_bind_backbuffer(void) static INLINE void gl2_bind_backbuffer(void)
{ {
#ifdef IOS #ifdef IOS
/* There is no default frame buffer on iOS. */ /* There is no default frame buffer on iOS. */
void cocoagl_bind_game_view_fbo(void); void cocoagl_bind_game_view_fbo(void);
cocoagl_bind_game_view_fbo(); cocoagl_bind_game_view_fbo();
#else #else
gl_bind_fb(0); gl2_bind_fb(0);
#endif #endif
} }
@ -149,7 +149,7 @@ static bool gl_recreate_fbo(
GLuint* texture GLuint* texture
) )
{ {
gl_bind_fb(fbo); gl2_bind_fb(fbo);
glDeleteTextures(1, texture); glDeleteTextures(1, texture);
glGenTextures(1, texture); glGenTextures(1, texture);
glBindTexture(GL_TEXTURE_2D, *texture); glBindTexture(GL_TEXTURE_2D, *texture);
@ -282,7 +282,7 @@ static void gl2_renderchain_render(
memcpy(fbo_info->coord, fbo_tex_coords, sizeof(fbo_tex_coords)); memcpy(fbo_info->coord, fbo_tex_coords, sizeof(fbo_tex_coords));
fbo_tex_info_cnt++; fbo_tex_info_cnt++;
gl_bind_fb(gl->fbo[i]); gl2_bind_fb(gl->fbo[i]);
shader_info.data = gl; shader_info.data = gl;
shader_info.idx = i + 1; shader_info.idx = i + 1;
@ -358,7 +358,7 @@ static void gl2_renderchain_render(
fbo_tex_info_cnt++; fbo_tex_info_cnt++;
/* Render our FBO texture to back buffer. */ /* Render our FBO texture to back buffer. */
gl_bind_backbuffer(); gl2_bind_backbuffer();
shader_info.data = gl; shader_info.data = gl;
shader_info.idx = gl->fbo_pass + 1; shader_info.idx = gl->fbo_pass + 1;
@ -472,7 +472,7 @@ static bool gl_create_fbo_targets(gl_t *gl)
{ {
GLenum status; GLenum status;
gl_bind_fb(gl->fbo[i]); gl2_bind_fb(gl->fbo[i]);
glFramebufferTexture2D(RARCH_GL_FRAMEBUFFER, glFramebufferTexture2D(RARCH_GL_FRAMEBUFFER,
RARCH_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gl->fbo_texture[i], 0); RARCH_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gl->fbo_texture[i], 0);
@ -486,7 +486,7 @@ static bool gl_create_fbo_targets(gl_t *gl)
GLenum status; GLenum status;
glGenFramebuffers(1, &gl->fbo_feedback); glGenFramebuffers(1, &gl->fbo_feedback);
gl_bind_fb(gl->fbo_feedback); gl2_bind_fb(gl->fbo_feedback);
glFramebufferTexture2D(RARCH_GL_FRAMEBUFFER, glFramebufferTexture2D(RARCH_GL_FRAMEBUFFER,
RARCH_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, RARCH_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
gl->fbo_feedback_texture, 0); gl->fbo_feedback_texture, 0);
@ -721,7 +721,7 @@ static void gl2_renderchain_start_render(void *data,
gl_t *gl = (gl_t*)data; gl_t *gl = (gl_t*)data;
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
gl_bind_fb(gl->fbo[0]); gl2_bind_fb(gl->fbo[0]);
gl_set_viewport(gl, gl_set_viewport(gl,
video_info, gl->fbo_rect[0].img_width, video_info, gl->fbo_rect[0].img_width,
@ -890,7 +890,7 @@ static bool gl2_renderchain_init_hw_render(
for (i = 0; i < gl->textures; i++) for (i = 0; i < gl->textures; i++)
{ {
gl_bind_fb(gl->hw_render_fbo[i]); gl2_bind_fb(gl->hw_render_fbo[i]);
glFramebufferTexture2D(RARCH_GL_FRAMEBUFFER, glFramebufferTexture2D(RARCH_GL_FRAMEBUFFER,
RARCH_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gl->texture[i], 0); RARCH_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gl->texture[i], 0);
@ -937,7 +937,7 @@ static bool gl2_renderchain_init_hw_render(
} }
} }
gl_bind_backbuffer(); gl2_bind_backbuffer();
gl->hw_render_fbo_init = true; gl->hw_render_fbo_init = true;
context_bind_hw_render(false); context_bind_hw_render(false);