? source/creator/winbuildinfo.h Index: source/blender/makesdna/DNA_scene_types.h =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/makesdna/DNA_scene_types.h,v retrieving revision 1.76 diff -u -r1.76 DNA_scene_types.h --- source/blender/makesdna/DNA_scene_types.h 28 Jul 2006 00:56:34 -0000 1.76 +++ source/blender/makesdna/DNA_scene_types.h 28 Jul 2006 15:18:11 -0000 @@ -288,6 +288,8 @@ float GIshadowquality, GIrefinement, GIpower, GIindirpower; float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold; + char stamp_u_data[128];// Contain the stamp user text + char backbuf[160], pic[160], ftype[160]; } RenderData; @@ -435,6 +437,7 @@ #define R_FBUF 0x40000 #define R_THREADS 0x80000 #define R_SPEED 0x100000 +#define R_STAMP_INFO 0x20000// Active the stamp info on rendering /* filtertype */ #define R_FILTER_BOX 0 Index: source/blender/render/intern/source/pipeline.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/render/intern/source/pipeline.c,v retrieving revision 1.90 diff -u -r1.90 pipeline.c --- source/blender/render/intern/source/pipeline.c 26 Jul 2006 05:03:53 -0000 1.90 +++ source/blender/render/intern/source/pipeline.c 28 Jul 2006 15:22:34 -0000 @@ -30,6 +30,7 @@ #include #include #include +#include "time.h"// For date stamp info #include "DNA_group_types.h" #include "DNA_image_types.h" @@ -1733,6 +1734,179 @@ RE_Database_Free(re); } +//] = */ {0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00}, +/* [?] = */ {0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x18,0x0c,0xcc,0x78,0x00}, +/* [@] = */ {0x00,0x00,0x7c,0xc0,0xc0,0xde,0xde,0xde,0xc6,0xc6,0x7c,0x00}, +/* [A] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x78,0x30,0x00}, +/* [B] = */ {0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [C] = */ {0x00,0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xc0,0xc6,0x66,0x3c,0x00}, +/* [D] = */ {0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00}, +/* [E] = */ {0x00,0x00,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00}, +/* [F] = */ {0x00,0x00,0xf0,0x60,0x60,0x64,0x7c,0x64,0x62,0x66,0xfe,0x00}, +/* [G] = */ {0x00,0x00,0x3e,0x66,0xc6,0xce,0xc0,0xc0,0xc6,0x66,0x3c,0x00}, +/* [H] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [I] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00}, +/* [J] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x1e,0x00}, +/* [K] = */ {0x00,0x00,0xe6,0x66,0x6c,0x6c,0x78,0x6c,0x6c,0x66,0xe6,0x00}, +/* [L] = */ {0x00,0x00,0xfe,0x66,0x66,0x62,0x60,0x60,0x60,0x60,0xf0,0x00}, +/* [M] = */ {0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xfe,0xfe,0xee,0xc6,0x00}, +/* [N] = */ {0x00,0x00,0xc6,0xc6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0xc6,0x00}, +/* [O] = */ {0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00}, +/* [P] = */ {0x00,0x00,0xf0,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [Q] = */ {0x00,0x1e,0x0c,0x7c,0xde,0xce,0xc6,0xc6,0xc6,0x6c,0x38,0x00}, +/* [R] = */ {0x00,0x00,0xe6,0x66,0x66,0x6c,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [S] = */ {0x00,0x00,0x78,0xcc,0xcc,0x18,0x70,0xc0,0xcc,0xcc,0x78,0x00}, +/* [T] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0xb4,0xfc,0x00}, +/* [U] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [V] = */ {0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [W] = */ {0x00,0x00,0x6c,0x6c,0x6c,0xd6,0xd6,0xc6,0xc6,0xc6,0xc6,0x00}, +/* [X] = */ {0x00,0x00,0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc,0xcc,0x00}, +/* [Y] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [Z] = */ {0x00,0x00,0xfe,0xc6,0x62,0x60,0x30,0x18,0x98,0xce,0xfe,0x00}, +/* [[] = */ {0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00}, +/* [\] = */ {0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00}, +/* []] = */ {0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00}, +/* [^] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x10}, +/* [_] = */ {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, +/* [`] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x30}, +/* [a] = */ {0x00,0x00,0x76,0xcc,0xcc,0x7c,0x0c,0x78,0x00,0x00,0x00,0x00}, +/* [b] = */ {0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xe0,0x00}, +/* [c] = */ {0x00,0x00,0x78,0xcc,0xc0,0xc0,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [d] = */ {0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1c,0x00}, +/* [e] = */ {0x00,0x00,0x78,0xcc,0xc0,0xfc,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [f] = */ {0x00,0x00,0xf0,0x60,0x60,0x60,0xf8,0x60,0x60,0x6c,0x38,0x00}, +/* [g] = */ {0x78,0xcc,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00}, +/* [h] = */ {0x00,0x00,0xe6,0x66,0x66,0x66,0x76,0x6c,0x60,0x60,0xe0,0x00}, +/* [i] = */ {0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x78,0x00,0x18,0x18,0x00}, +/* [j] = */ {0x78,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x0c,0x0c,0x00}, +/* [k] = */ {0x00,0x00,0xe6,0x66,0x6c,0x78,0x6c,0x66,0x60,0x60,0xe0,0x00}, +/* [l] = */ {0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x00}, +/* [m] = */ {0x00,0x00,0xc6,0xd6,0xd6,0xd6,0xd6,0xfc,0x00,0x00,0x00,0x00}, +/* [n] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xf8,0x00,0x00,0x00,0x00}, +/* [o] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [p] = */ {0xf0,0x60,0x7c,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00}, +/* [q] = */ {0x1e,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00}, +/* [r] = */ {0x00,0x00,0xf0,0x60,0x60,0x76,0x6e,0xec,0x00,0x00,0x00,0x00}, +/* [s] = */ {0x00,0x00,0x78,0xcc,0x18,0x60,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [t] = */ {0x00,0x00,0x38,0x6c,0x60,0x60,0x60,0xfc,0x60,0x20,0x00,0x00}, +/* [u] = */ {0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00}, +/* [v] = */ {0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00}, +/* [w] = */ {0x00,0x00,0x6c,0x6c,0xd6,0xd6,0xc6,0xc6,0x00,0x00,0x00,0x00}, +/* [x] = */ {0x00,0x00,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00}, +/* [y] = */ {0xf0,0x18,0x0c,0x3c,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00}, +/* [z] = */ {0x00,0x00,0xfc,0xc4,0x60,0x18,0x8c,0xfc,0x00,0x00,0x00,0x00}, +/* [{] = */ {0x00,0x00,0x1c,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x1c,0x00}, +/* [|] = */ {0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00}, +/* [}] = */ {0x00,0x00,0xe0,0x30,0x30,0x18,0x0c,0x18,0x30,0x30,0xe0,0x00}, +/* [~] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xda,0x73,0x00}, +}; + +posfin pasatexto(char* texto, unsigned short xref,unsigned short yref,Render *re) { + posfin pos; + int lentexto=strlen(texto); + int i,j,cha=0; + unsigned char ftlnbt; + unsigned short width = re->rectx; + unsigned short height = re->recty; + RenderResult rres; + RE_GetResultImage(re, &rres); + unsigned short x,y,textposx; + for (i=0,j=0; i < lentexto; i++,j++) { + cha=texto[i]-32; + if(cha<0||cha>94) + cha=0; + textposx=xref+(j*8); + if ((textposx+8)>width){ + yref+=12; + textposx=xref=1; + j=0; + } + for (y=0;y<12;y++){ + if ((yref+y)>height) + return pos; + float* bpt = (float*)rres.rectf + ((((height-1)-yref+y)*width)<<2); + pos.y=yref+y; + bpt=bpt+(4*textposx); + for (x=0;x<8;x++) { + ftlnbt=fntdat[cha][y]; + if(ftlnbt&(0x80>>x)){ + bpt[0]=1; + bpt[1]=bpt[2]=0; + } + bpt += 4; + pos.x=(4*textposx)+x; + } + } + } + return pos; +} + +void stamp (Render *re){ + posfin pos; + char text[254],dat[9],tim_buf[15]; +#ifdef WIN32 + _strdate( dat); +#else + time_t tim=time(NULL); + struct tm *now=localtime(&tim); + sprintf(dat,"%02d-%02d-%02d", now->tm_mon+1, now->tm_mday,now->tm_year-100 ); +#endif + pos=pasatexto(G.sce,1,12,re); + float seg=(float)(G.scene->r.cfra-G.scene->r.sfra)/(float)re->r.frs_sec; + int dia=seg/86400; + int hor=(seg/3600)-(dia*24); + int min=(seg/60)-(hor*60); + seg=seg-(hor*3600)-(min*60); + sprintf(tim_buf,"%02d:%02d:%0.3f",hor,min,seg); + sprintf(text,"%s f#%i",tim_buf,G.scene->r.cfra); + pos=pasatexto(text,1,pos.y,re); + pos=pasatexto(re->r.stamp_u_data,1,re->recty-24,re); + pos=pasatexto(dat,1,re->recty-12,re); + strcpy(text,G.scene->camera->id.name); + text[0]=text[1]=' '; + pos.x=(re->rectx/2)-(strlen(text)*4); + pos=pasatexto(text,pos.x,re->recty-12,re); + strcpy(text,G.scene->id.name); + text[0]=text[1]=' '; + pos.x=re->rectx-((strlen(text)+1)*8); + pos=pasatexto(text,pos.x,re->recty-12,re); +} +//rcruiz> /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -1755,6 +1929,8 @@ yafrayRender(re); else do_render_composite_fields_blur_3d(re); + if (re->r.mode & R_STAMP_INFO)// if stamp info + stamp(re);// Put stamp in render window } re->i.lastframetime= PIL_check_seconds_timer()- re->i.starttime; Index: source/blender/src/buttons_scene.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/src/buttons_scene.c,v retrieving revision 1.141 diff -u -r1.141 buttons_scene.c --- source/blender/src/buttons_scene.c 11 Jul 2006 11:54:59 -0000 1.141 +++ source/blender/src/buttons_scene.c 28 Jul 2006 15:26:55 -0000 @@ -1171,8 +1171,15 @@ uiBlockEndAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); - uiDefButBitS(block, TOG, R_BACKBUF, B_NOP,"Backbuf", 10, 94, 80, 20, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image"); - uiDefButBitI(block, TOG, R_THREADS, B_NOP,"Threads", 10, 68, 80, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable render in two threads"); + //r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image"); + uiDefButBitI(block, TOG, R_THREADS, B_NOP,"Threads", 10, 74, 80, 19, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable render in two threads"); + if (G.scene->r.mode&R_STAMP_INFO){ + uiDefButBitI(block, TOG, R_STAMP_INFO, B_REDR,"SI", 10, 54, 10, 19, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable stamp info in render"); + uiDefBut(block, TEX, B_NOP, "U:", 20,54,70,19, &G.scene->r.stamp_u_data, 0.0,128.0, 100, 0, ""); + } else + uiDefButBitI(block, TOG, R_STAMP_INFO, B_REDR,"StampInfo", 10, 54, 80, 19, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable stamp info in render"); + //rcruiz> uiBlockSetCol(block, TH_AUTO); uiBlockBeginAlign(block); Index: source/blender/src/renderwin.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/src/renderwin.c,v retrieving revision 1.108 diff -u -r1.108 renderwin.c --- source/blender/src/renderwin.c 18 Jul 2006 16:49:33 -0000 1.108 +++ source/blender/src/renderwin.c 28 Jul 2006 15:35:22 -0000 @@ -64,6 +64,7 @@ #include "DNA_image_types.h" #include "DNA_screen_types.h" +#include "DNA_camera_types.h"// For camera structure in stamp opengl #include "DNA_scene_types.h" #include "DNA_view3d_types.h" #include "DNA_vec_types.h" @@ -104,6 +105,7 @@ #include "blendef.h" #include "mydevice.h" #include "winlay.h" +#include "time.h"// For date on stamp info /* ------------ renderwin struct, to prevent too much global vars --------- */ /* ------------ only used for display in a 2nd window --------- */ @@ -1197,6 +1199,182 @@ if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_POSTRENDER); } +//] = */ {0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00}, +/* [?] = */ {0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x18,0x0c,0xcc,0x78,0x00}, +/* [@] = */ {0x00,0x00,0x7c,0xc0,0xc0,0xde,0xde,0xde,0xc6,0xc6,0x7c,0x00}, +/* [A] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x78,0x30,0x00}, +/* [B] = */ {0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [C] = */ {0x00,0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xc0,0xc6,0x66,0x3c,0x00}, +/* [D] = */ {0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00}, +/* [E] = */ {0x00,0x00,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00}, +/* [F] = */ {0x00,0x00,0xf0,0x60,0x60,0x64,0x7c,0x64,0x62,0x66,0xfe,0x00}, +/* [G] = */ {0x00,0x00,0x3e,0x66,0xc6,0xce,0xc0,0xc0,0xc6,0x66,0x3c,0x00}, +/* [H] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [I] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00}, +/* [J] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x1e,0x00}, +/* [K] = */ {0x00,0x00,0xe6,0x66,0x6c,0x6c,0x78,0x6c,0x6c,0x66,0xe6,0x00}, +/* [L] = */ {0x00,0x00,0xfe,0x66,0x66,0x62,0x60,0x60,0x60,0x60,0xf0,0x00}, +/* [M] = */ {0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xfe,0xfe,0xee,0xc6,0x00}, +/* [N] = */ {0x00,0x00,0xc6,0xc6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0xc6,0x00}, +/* [O] = */ {0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00}, +/* [P] = */ {0x00,0x00,0xf0,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [Q] = */ {0x00,0x1e,0x0c,0x7c,0xde,0xce,0xc6,0xc6,0xc6,0x6c,0x38,0x00}, +/* [R] = */ {0x00,0x00,0xe6,0x66,0x66,0x6c,0x7c,0x66,0x66,0x66,0xfc,0x00}, +/* [S] = */ {0x00,0x00,0x78,0xcc,0xcc,0x18,0x70,0xc0,0xcc,0xcc,0x78,0x00}, +/* [T] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0xb4,0xfc,0x00}, +/* [U] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [V] = */ {0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [W] = */ {0x00,0x00,0x6c,0x6c,0x6c,0xd6,0xd6,0xc6,0xc6,0xc6,0xc6,0x00}, +/* [X] = */ {0x00,0x00,0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc,0xcc,0x00}, +/* [Y] = */ {0x00,0x00,0x78,0x30,0x30,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0x00}, +/* [Z] = */ {0x00,0x00,0xfe,0xc6,0x62,0x60,0x30,0x18,0x98,0xce,0xfe,0x00}, +/* [[] = */ {0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00}, +/* [\] = */ {0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00}, +/* []] = */ {0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00}, +/* [^] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x10}, +/* [_] = */ {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, +/* [`] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x30}, +/* [a] = */ {0x00,0x00,0x76,0xcc,0xcc,0x7c,0x0c,0x78,0x00,0x00,0x00,0x00}, +/* [b] = */ {0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xe0,0x00}, +/* [c] = */ {0x00,0x00,0x78,0xcc,0xc0,0xc0,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [d] = */ {0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1c,0x00}, +/* [e] = */ {0x00,0x00,0x78,0xcc,0xc0,0xfc,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [f] = */ {0x00,0x00,0xf0,0x60,0x60,0x60,0xf8,0x60,0x60,0x6c,0x38,0x00}, +/* [g] = */ {0x78,0xcc,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00}, +/* [h] = */ {0x00,0x00,0xe6,0x66,0x66,0x66,0x76,0x6c,0x60,0x60,0xe0,0x00}, +/* [i] = */ {0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x78,0x00,0x18,0x18,0x00}, +/* [j] = */ {0x78,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x0c,0x0c,0x00}, +/* [k] = */ {0x00,0x00,0xe6,0x66,0x6c,0x78,0x6c,0x66,0x60,0x60,0xe0,0x00}, +/* [l] = */ {0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x00}, +/* [m] = */ {0x00,0x00,0xc6,0xd6,0xd6,0xd6,0xd6,0xfc,0x00,0x00,0x00,0x00}, +/* [n] = */ {0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xf8,0x00,0x00,0x00,0x00}, +/* [o] = */ {0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [p] = */ {0xf0,0x60,0x7c,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00}, +/* [q] = */ {0x1e,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00}, +/* [r] = */ {0x00,0x00,0xf0,0x60,0x60,0x76,0x6e,0xec,0x00,0x00,0x00,0x00}, +/* [s] = */ {0x00,0x00,0x78,0xcc,0x18,0x60,0xcc,0x78,0x00,0x00,0x00,0x00}, +/* [t] = */ {0x00,0x00,0x38,0x6c,0x60,0x60,0x60,0xfc,0x60,0x20,0x00,0x00}, +/* [u] = */ {0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00}, +/* [v] = */ {0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00}, +/* [w] = */ {0x00,0x00,0x6c,0x6c,0xd6,0xd6,0xc6,0xc6,0x00,0x00,0x00,0x00}, +/* [x] = */ {0x00,0x00,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00}, +/* [y] = */ {0xf0,0x18,0x0c,0x3c,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00}, +/* [z] = */ {0x00,0x00,0xfc,0xc4,0x60,0x18,0x8c,0xfc,0x00,0x00,0x00,0x00}, +/* [{] = */ {0x00,0x00,0x1c,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x1c,0x00}, +/* [|] = */ {0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00}, +/* [}] = */ {0x00,0x00,0xe0,0x30,0x30,0x18,0x0c,0x18,0x30,0x30,0xe0,0x00}, +/* [~] = */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xce,0xda,0x73,0x00}, +}; + +posfin pasatextoRec32(char* texto, unsigned short xref,unsigned short yref,char *rec32,int winx,int winy) { + posfin pos; + int lentexto=strlen(texto); + int i,j,cha=0; + unsigned char ftlnbt; + unsigned short x,y,textposx; + char *rc; + for (i=0,j=0; i < lentexto; i++,j++) { + cha=texto[i]-32; + if(cha<0||cha>94) + cha=0; + textposx=xref+(j*8); + if ((textposx+8)>winx){ + yref-=12; + textposx=xref=1; + j=0; + } + for (y=0;y<12;y++){ + rc=rec32+(4*winx*yref)+(4*y*winx); + pos.y=yref-y; + rc=rc+(4*textposx); + for (x=0;x<8;x++) { + ftlnbt=fntdat_cpy[cha][y]; + if(ftlnbt&(0x80>>x)){ + rc[0]=255;//FTOCHAR(1); + rc[1]=rc[2]=0; + } + rc += 4; + pos.x=(4*textposx)+x; + } + } + } + return pos; +} + +void stampRec32 (char *rec32,int winx,int winy,View3D *v3d){ + posfin pos; + char text[240],dat[9],tim_buf[15]; +#ifdef WIN32 + _strdate( dat); +#else + time_t tim=time(NULL); + struct tm *now=localtime(&tim); + sprintf(dat,"%02d-%02d-%02d", now->tm_mon+1, now->tm_mday,now->tm_year-100 ); +#endif + pos=pasatextoRec32(G.sce,1,winy-12,rec32,winx,winy); + float seg=(float)(G.scene->r.cfra-G.scene->r.sfra)/(float)G.scene->r.frs_sec; + int dia=seg/86400; + int hor=(seg/3600)-(dia*24); + int min=(seg/60)-(hor*60); + seg=seg-(hor*3600)-(min*60); + sprintf(tim_buf,"%02d:%02d:%0.3f",hor,min,seg); + sprintf(text,"%s f#%i",tim_buf,G.scene->r.cfra); + pos=pasatextoRec32(text,1,pos.y,rec32,winx,winy); + pos=pasatextoRec32(G.scene->r.stamp_u_data,1,12,rec32,winx,winy); + pos=pasatextoRec32(dat,1,1,rec32,winx,winy); + if (v3d->persp==V3D_PERSP_USE_THE_CAMERA){ + Camera *cam; + cam=G.scene->camera; + strcpy(text,cam->id.name); + text[0]=text[1]=' '; + } + else if (v3d->persp==V3D_PERSP_ORTHO) + strcpy(text,"Ortho View"); + else + strcpy(text,"Perspective"); + pos.x=(winx/2)-(strlen(text)*4); + pos=pasatextoRec32(text,pos.x,1,rec32,winx,winy); + strcpy(text,G.scene->id.name); + text[0]=text[1]=' '; + pos.x=winx-((strlen(text)+1)*8); + pos=pasatextoRec32(text,pos.x,1,rec32,winx,winy); +} +//rcruiz> + /* set up display, render the current area view in an image */ /* the RE_Render is only used to make sure we got the picture in the result */ void BIF_do_ogl_render(View3D *v3d, int anim) @@ -1240,6 +1418,8 @@ break; drawview3d_render(v3d, winx, winy); glReadPixels(0, 0, winx, winy, GL_RGBA, GL_UNSIGNED_BYTE, rr->rect32); + if (G.scene->r.mode&R_STAMP_INFO)// If Stamp info + stampRec32(rr->rect32, winx, winy,v3d);// Put stamp on rect32 for opengl window_swap_buffers(render_win->win); if(BKE_imtype_is_movie(G.scene->r.imtype)) { @@ -1279,6 +1459,8 @@ else { drawview3d_render(v3d, winx, winy); glReadPixels(0, 0, winx, winy, GL_RGBA, GL_UNSIGNED_BYTE, rr->rect32); + if (G.scene->r.mode&R_STAMP_INFO)// If Stamp info + stampRec32(rr->rect32, winx, winy,v3d);// Put stamp on rect32 for opengl window_swap_buffers(render_win->win); }