Changeset 2041 for trunk/tools


Ignore:
Timestamp:
Oct 24, 2012, 6:57:20 PM (7 years ago)
Author:
rez
Message:

neercs: moved some init variable, removed useless iborder init

File:
1 edited

Legend:

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

    r2039 r2041  
    4848
    4949/*
    50  * Global variable -- ugly
     50 * Global variable -- ugly (<rez> sam: c'est toi qui est ugly! \:D/)
    5151 */
    5252bool g_setup = false;
     
    5959float nearplane = 0.1f;    // nearplane
    6060float farplane = 1000.0f;  // farplane
    61 int polygon_fillmode = GL_FILL; // fill mode
    6261/* timer variable */
    6362float timer = 0;           // timer
    6463/* window variable */
    6564ivec2 screen_size;         // screen size
    66 vec3 screen_color = vec3(0.125f, 0.125f, 0.125f); // screen color
    6765/* object variable */
    6866float main_angle = 0.0f;   // main angle
     
    9492/* common variable */
    9593float value, angle, radius, scale, speed;
     94/* text variable */
     95ivec2 map_size(256,256);        // texture map size
     96ivec2 canvas_char(0,0);         // canvas char number
     97ivec2 canvas_size(0,0);         // caca size
     98ivec2 font_size(8,8);           // font size
     99ivec2 ratio_2d(2,3);            // 2d ratio
     100ivec2 border(2,1);              // border width
    96101/* shader variable */
    97102vec2 buffer(0.2f,0.8f);         // [new frame mix,old frame mix]
     
    121126vec4 mirror(0.95f,0.9f,0.4f,4.0f);              // mirror [width,height,strength,ratio]
    122127vec4 radial(4.0f,0.9f,16,0.25f);                // radial [distance,fade ratio,iteration,strength]
    123 /* text variable */
    124 ivec2 ratio_2d(2,3);            // 2d ratio
    125 ivec2 map_size(256,256);        // texture map size
    126 ivec2 font_size(8,8);           // font size
    127 ivec2 canvas_char(0,0);         // canvas char number
    128 ivec2 canvas_size(0,0);         // caca size
    129 ivec2 border(2 * ratio_2d.x * font_size.x,1 * ratio_2d.y * font_size.y); // border width
    130128/* setup variable */
    131129bool setup_switch = false;      // switch [option/item]
     
    272270    };
    273271
     272vec4 theme_var[]={
     273    vec4(0), /* default */
     274        vec4(0),
     275    vec4(0), /* crt */
     276        vec4(0),
     277    vec4(0), /* green screen */
     278        vec4(0),
     279    vec4(0), /* granpa tv */
     280        vec4(0)
     281    };
     282
    274283vec4 setup_var[]={ // setup variable [start,end,step,value]
    275284    vec4(0), /* main */
    276285        vec4(1,  8, 1, ratio_2d.x),
    277286        vec4(1,  8, 1, ratio_2d.y),
    278         vec4(0, 16, 1, border.x / ratio_2d.x / font_size.x),
    279         vec4(0, 16, 1, border.y / ratio_2d.y / font_size.y),
     287        vec4(0, 16, 1, border.x),
     288        vec4(0, 16, 1, border.y),
    280289        vec4(0),
    281290        vec4(0),
     
    11321141    glBlendFunc(GL_SRC_COLOR, GL_DST_ALPHA);
    11331142
    1134     Video::SetClearColor(vec4(screen_color, 1.f));
     1143    Video::SetClearColor(vec4(0.0f, 0.0f, 0.0f, 1.0f));
    11351144    Video::SetClearDepth(1.0f); // set depth buffer
    11361145    Video::Clear(ClearMask::Color | ClearMask::Depth);
Note: See TracChangeset for help on using the changeset viewer.