Changeset 2041
- Timestamp:
- Oct 24, 2012, 6:57:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/neercs/video/render.cpp
r2039 r2041 48 48 49 49 /* 50 * Global variable -- ugly 50 * Global variable -- ugly (<rez> sam: c'est toi qui est ugly! \:D/) 51 51 */ 52 52 bool g_setup = false; … … 59 59 float nearplane = 0.1f; // nearplane 60 60 float farplane = 1000.0f; // farplane 61 int polygon_fillmode = GL_FILL; // fill mode62 61 /* timer variable */ 63 62 float timer = 0; // timer 64 63 /* window variable */ 65 64 ivec2 screen_size; // screen size 66 vec3 screen_color = vec3(0.125f, 0.125f, 0.125f); // screen color67 65 /* object variable */ 68 66 float main_angle = 0.0f; // main angle … … 94 92 /* common variable */ 95 93 float value, angle, radius, scale, speed; 94 /* text variable */ 95 ivec2 map_size(256,256); // texture map size 96 ivec2 canvas_char(0,0); // canvas char number 97 ivec2 canvas_size(0,0); // caca size 98 ivec2 font_size(8,8); // font size 99 ivec2 ratio_2d(2,3); // 2d ratio 100 ivec2 border(2,1); // border width 96 101 /* shader variable */ 97 102 vec2 buffer(0.2f,0.8f); // [new frame mix,old frame mix] … … 121 126 vec4 mirror(0.95f,0.9f,0.4f,4.0f); // mirror [width,height,strength,ratio] 122 127 vec4 radial(4.0f,0.9f,16,0.25f); // radial [distance,fade ratio,iteration,strength] 123 /* text variable */124 ivec2 ratio_2d(2,3); // 2d ratio125 ivec2 map_size(256,256); // texture map size126 ivec2 font_size(8,8); // font size127 ivec2 canvas_char(0,0); // canvas char number128 ivec2 canvas_size(0,0); // caca size129 ivec2 border(2 * ratio_2d.x * font_size.x,1 * ratio_2d.y * font_size.y); // border width130 128 /* setup variable */ 131 129 bool setup_switch = false; // switch [option/item] … … 272 270 }; 273 271 272 vec4 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 274 283 vec4 setup_var[]={ // setup variable [start,end,step,value] 275 284 vec4(0), /* main */ 276 285 vec4(1, 8, 1, ratio_2d.x), 277 286 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), 280 289 vec4(0), 281 290 vec4(0), … … 1132 1141 glBlendFunc(GL_SRC_COLOR, GL_DST_ALPHA); 1133 1142 1134 Video::SetClearColor(vec4( screen_color, 1.f));1143 Video::SetClearColor(vec4(0.0f, 0.0f, 0.0f, 1.0f)); 1135 1144 Video::SetClearDepth(1.0f); // set depth buffer 1136 1145 Video::Clear(ClearMask::Color | ClearMask::Depth);
Note: See TracChangeset
for help on using the changeset viewer.