(gl.c) Turned some functions inline

This commit is contained in:
Twinaphex 2012-05-29 04:53:42 +02:00
parent 0473785f65
commit b995f8da9f

View File

@ -612,7 +612,7 @@ static void gl_compute_fbo_geometry(gl_t *gl, unsigned width, unsigned height,
}
}
static void gl_start_frame_fbo(gl_t *gl)
static inline void gl_start_frame_fbo(gl_t *gl)
{
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
pglBindFramebuffer(GL_FRAMEBUFFER, gl->fbo[0]);
@ -794,7 +794,7 @@ static void gl_update_input_size(gl_t *gl, unsigned width, unsigned height, unsi
}
#ifdef __CELLOS_LV2__
static void gl_copy_frame(gl_t *gl, const void *frame, unsigned width, unsigned height, unsigned pitch)
static inline void gl_copy_frame(gl_t *gl, const void *frame, unsigned width, unsigned height, unsigned pitch)
{
if (!gl->fbo_inited)
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
@ -838,7 +838,7 @@ static void gl_init_textures(gl_t *gl)
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
}
#else
static void gl_copy_frame(gl_t *gl, const void *frame, unsigned width, unsigned height, unsigned pitch)
static inline void gl_copy_frame(gl_t *gl, const void *frame, unsigned width, unsigned height, unsigned pitch)
{
glPixelStorei(GL_UNPACK_ROW_LENGTH, pitch / gl->base_size);
glTexSubImage2D(GL_TEXTURE_2D,
@ -867,7 +867,7 @@ static void gl_init_textures(gl_t *gl)
}
#endif
static void gl_next_texture_index(gl_t *gl, const struct gl_tex_info *tex_info)
static inline void gl_next_texture_index(gl_t *gl, const struct gl_tex_info *tex_info)
{
memmove(gl->prev_info + 1, gl->prev_info, sizeof(*tex_info) * (TEXTURES - 1));
memcpy(&gl->prev_info[0], tex_info, sizeof(*tex_info));