(Rmenu/fonts) no longer use gl_render_msg_post
This commit is contained in:
parent
ab3b97cb40
commit
17780cb5a8
|
@ -225,27 +225,10 @@ extern const GLfloat white_color[];
|
|||
|
||||
#endif
|
||||
|
||||
void gl_render_msg_post(gl_t *gl)
|
||||
{
|
||||
#ifdef HAVE_FREETYPE
|
||||
// Go back to old rendering path.
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, gl->tex_coords);
|
||||
glVertexPointer(2, GL_FLOAT, 0, vertexes_flipped);
|
||||
glColorPointer(4, GL_FLOAT, 0, white_color);
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
struct gl_ortho ortho = {0, 1, 0, 1, -1, 1};
|
||||
gl_set_projection(gl, &ortho, true);
|
||||
#else
|
||||
(void)gl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void gl_render_msg(gl_t *gl, const char *msg)
|
||||
void gl_render_msg(void *data, const char *msg)
|
||||
{
|
||||
#ifdef HAVE_FREETYPE
|
||||
gl_t *gl = (gl_t*)data;
|
||||
if (!gl->font)
|
||||
return;
|
||||
|
||||
|
@ -287,6 +270,17 @@ void gl_render_msg(gl_t *gl, const char *msg)
|
|||
glVertexPointer(2, GL_FLOAT, 0, font_vertex);
|
||||
glColorPointer(4, GL_FLOAT, 0, gl->font_color);
|
||||
glDrawArrays(GL_QUADS, 0, 4);
|
||||
|
||||
// Post - Go back to old rendering path.
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, gl->tex_coords);
|
||||
glVertexPointer(2, GL_FLOAT, 0, vertexes_flipped);
|
||||
glColorPointer(4, GL_FLOAT, 0, white_color);
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
struct gl_ortho ortho = {0, 1, 0, 1, -1, 1};
|
||||
gl_set_projection(gl, &ortho, true);
|
||||
#else
|
||||
(void)gl;
|
||||
(void)msg;
|
||||
|
|
|
@ -36,21 +36,18 @@ void gl_deinit_font(gl_t *gl)
|
|||
cellDbgFontExit();
|
||||
}
|
||||
|
||||
void gl_render_msg(gl_t *gl, const char *msg)
|
||||
void gl_render_msg(void *data, const char *msg)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, 0.75f, 1.06f, SILVER, msg);
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, 0.75f, 1.05f, WHITE, msg);
|
||||
}
|
||||
|
||||
void gl_render_msg_place(void *data, float x, float y, float scale, uint32_t color, const char *msg)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
(void)data;
|
||||
|
||||
cellDbgFontPrintf(x, y, scale, color, msg);
|
||||
gl_render_msg_post(gl);
|
||||
}
|
||||
|
||||
void gl_render_msg_post(gl_t *gl)
|
||||
{
|
||||
cellDbgFontDraw();
|
||||
cellDbgFontDraw(); //post
|
||||
}
|
||||
|
|
|
@ -22,17 +22,12 @@ void xfonts_deinit_font(void)
|
|||
{
|
||||
}
|
||||
|
||||
void xfonts_render_msg_pre(xdk_d3d_video_t *d3d)
|
||||
{
|
||||
d3d->d3d_render_device->GetBackBuffer(-1, D3DBACKBUFFER_TYPE_MONO, &d3d->pFrontBuffer);
|
||||
d3d->d3d_render_device->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &d3d->pBackBuffer);
|
||||
}
|
||||
|
||||
void xfonts_render_msg_place(void *data, float x, float y, float scale, const char *msg)
|
||||
{
|
||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)data;
|
||||
|
||||
xfonts_render_msg_pre(d3d);
|
||||
d3d->d3d_render_device->GetBackBuffer(-1, D3DBACKBUFFER_TYPE_MONO, &d3d->pFrontBuffer);
|
||||
d3d->d3d_render_device->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &d3d->pBackBuffer);
|
||||
|
||||
wchar_t str[256];
|
||||
convert_char_to_wchar(str, msg, sizeof(str));
|
||||
|
@ -40,10 +35,6 @@ void xfonts_render_msg_place(void *data, float x, float y, float scale, const ch
|
|||
d3d->debug_font->TextOut(d3d->pBackBuffer, str, (unsigned)-1, x, y);
|
||||
|
||||
xfonts_render_msg_post(d3d);
|
||||
}
|
||||
|
||||
void xfonts_render_msg_post(xdk_d3d_video_t *d3d)
|
||||
{
|
||||
d3d->pFrontBuffer->Release();
|
||||
d3d->pBackBuffer->Release();
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#define RARCH_XDK1_FONTS_H
|
||||
|
||||
void xfonts_deinit_font(void);
|
||||
void xfonts_render_msg_pre(xdk_d3d_video_t *d3d);
|
||||
void xfonts_render_msg_place(xdk_d3d_video_t *d3d, float x, float y, float scale, const char *msg);
|
||||
void xfonts_render_msg_post(xdk_d3d_video_t *d3d);
|
||||
|
||||
#endif
|
||||
|
|
3
gfx/gl.c
3
gfx/gl.c
|
@ -931,10 +931,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
|||
gl_next_texture_index(gl, &tex_info);
|
||||
|
||||
if (msg)
|
||||
{
|
||||
gl_render_msg(gl, msg);
|
||||
gl_render_msg_post(gl);
|
||||
}
|
||||
|
||||
#ifndef RARCH_CONSOLE
|
||||
gfx_ctx_update_window_title(false);
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
|
||||
void gl_init_font(gl_t *gl, const char *font_path, unsigned font_size);
|
||||
void gl_deinit_font(gl_t *gl);
|
||||
void gl_render_msg(gl_t *gl, const char *msg);
|
||||
void gl_render_msg_post(gl_t *gl);
|
||||
void gl_render_msg(void *data, const char *msg);
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
void gl_render_msg_place(void *data, float x, float y, float scale, uint32_t color, const char *msg);
|
||||
|
|
|
@ -452,7 +452,6 @@ static bool xdk_d3d_frame(void *data, const void *frame,
|
|||
{
|
||||
static MEMORYSTATUS stat;
|
||||
GlobalMemoryStatus(&stat);
|
||||
xfonts_render_msg_pre(d3d);
|
||||
|
||||
//Output memory usage
|
||||
|
||||
|
@ -471,8 +470,6 @@ static bool xdk_d3d_frame(void *data, const void *frame,
|
|||
}
|
||||
else if(buf_fps_last)
|
||||
xfonts_render_msg_place(d3d, font_x + 30, font_y + 70, 0 /* scale */, buf2);
|
||||
|
||||
xfonts_render_msg_post(d3d);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue