Changeset 1883


Ignore:
Timestamp:
Sep 6, 2012, 1:08:24 AM (8 years ago)
Author:
rez
Message:

fixed border w/h unit (now equal to one char)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/video/render.cpp

    r1882 r1883  
    117117ivec2 canvas_size(0,0);         // caca size
    118118/* window variable */
    119 ivec2 border = 18 * ratio_2d;  // border width
     119ivec2 border = vec2(3,1) * ratio_2d * font_size; // border width
    120120/* setup variable */
    121121bool setup_switch = false;      // switch [option/item]
     
    230230        vec4( 1,  8, 1, ratio_2d.x),
    231231        vec4( 1,  8, 1, ratio_2d.y),
    232         vec4( 0, 64, 1, border.x / ratio_2d.x),
    233         vec4( 0, 64, 1, border.y / ratio_2d.y),
     232        vec4( 0, 64, 1, border.x / ratio_2d.x / font_size.x),
     233        vec4( 0, 64, 1, border.y / ratio_2d.y / font_size.y),
    234234        vec4(0),
    235235        vec4(0),
     
    324324    int k = 1; /* main */
    325325    ratio_2d = vec2(setup_var[k].w, setup_var[k + 1].w); k += 2;
    326     border = vec2(setup_var[k].w, setup_var[k + 1].w) * ratio_2d; k += 2;
     326    border = vec2(setup_var[k].w, setup_var[k + 1].w) * ratio_2d * font_size; k += 2;
    327327    k += 5; /* remanency */
    328328    m_shader_remanency = (setup_var[k].w == 1) ? true : false; k++;
Note: See TracChangeset for help on using the changeset viewer.