camera_finalize( &ortho );
-
-
-
/* icons */
- font3d_bind( &gui.font, &ortho );
+ font3d_bind( &gui.font, k_font_shader_default, 0, NULL, &ortho );
+ mesh_bind( &gui.icons_mesh );
+
m4x3f mmdl;
m4x3_identity( mmdl );
shader_model_font_uMdl( mmdl );
- mesh_bind( &gui.icons_mesh );
shader_model_font_uColour( (v4f){1.0f,1.0f,1.0f,1.0f} );
glActiveTexture( GL_TEXTURE0 );
glBindTexture( GL_TEXTURE_2D, gui.icons_texture );
-
-
gui.factive = vg_lerpf( gui.factive, gui.helper_count?1.0f:0.0f,
vg.time_frame_delta*2.0f );
v3_zero( mmdl[3] );
f32 pad = dy*0x1p-4f*0.125f;
- f32 w = font3d_string_width( &gui.font,2,gui.location );
+ f32 w = font3d_string_width( 2, gui.location );
mmdl[3][0] = fr*0.5f - w*scale*0.5f;
mmdl[3][1] = 0.3f*ft+pad*2.0f;
- font3d_bind( &gui.font, &ortho );
+ font3d_bind( &gui.font, k_font_shader_default, 0, NULL, &ortho );
shader_model_font_uColour( (v4f){1.2f,1.2f,1.2f,o} );
- font3d_simple_draw( &gui.font, 2, k_font_shader_default,
- gui.location, &ortho, mmdl );
+ font3d_simple_draw( 2, gui.location, &ortho, mmdl );
}
-
- font3d_bind( &gui.font, &ortho );
+ else
+ font3d_bind( &gui.font, k_font_shader_default, 0, NULL, &ortho );
float dy = ft/0.79f,
scale = dy*0x1p-4f*0.75f;
for( u32 i=0; i<gui.helper_count; i++ ){
struct gui_helper *helper = &gui.helpers[i];
- shader_model_font_uColour( (v4f){1.0f,1.0f,1.0f,1.0f} );
-
- struct font3d_render render = {
- .font = &gui.font,
- .variant_id = 2,
- .shader = k_font_shader_default
- };
- font3d_begin( helper->bindstr, &ortho, mmdl, &render );
- font3d_draw( &render );
+ font3d_setcolour( (v4f){1.0f,1.0f,1.0f,1.0f} );
+ font3d_simple_draw( 2, helper->bindstr, &ortho, mmdl );
const char *make_smaller = "\x02\xaf\x03 ";
- render.u8pch = (const u8*)make_smaller;
- font3d_draw( &render );
-
- render.u8pch = (u8*)helper->text;
- font3d_draw( &render );
+ font3d_draw( make_smaller );
+ font3d_draw( helper->text );
- float w = render.offset[0]+1.0f;
+ float w = gui_font3d.offset[0]+1.0f;
mmdl[3][0] += w*scale;
}