remove backbuf from internal struct's (unused in 2.5x)

This commit is contained in:
Campbell Barton 2011-06-11 08:55:29 +00:00
parent c2e1f3a1e2
commit a3101de7be
6 changed files with 7 additions and 72 deletions

@ -253,20 +253,13 @@ typedef struct RenderData {
*/ */
short yparts; short yparts;
short winpos, planes, imtype, subimtype; short planes, imtype, subimtype, quality;
/** Mode bits: */
/* 0: Enable backbuffering for images */
short bufflag;
short quality;
/** /**
* Render to image editor, fullscreen or to new window. * Render to image editor, fullscreen or to new window.
*/ */
short displaymode; short displaymode;
short rpad1, rpad2;
/** /**
* Flags for render settings. Use bit-masking to access the settings. * Flags for render settings. Use bit-masking to access the settings.
*/ */
@ -322,11 +315,7 @@ typedef struct RenderData {
/** /**
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45 * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
*/ */
float xasp; float xasp, yasp;
/**
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
*/
float yasp;
float frs_sec_base; float frs_sec_base;
@ -349,7 +338,7 @@ typedef struct RenderData {
short bake_normal_space, bake_quad_split; short bake_normal_space, bake_quad_split;
float bake_maxdist, bake_biasdist, bake_pad; float bake_maxdist, bake_biasdist, bake_pad;
/* paths to backbufffer, output */ /* path to render output, can contain // suffix and #'s for current frame */
char pic[240]; char pic[240];
/* stamps flags. */ /* stamps flags. */

@ -214,7 +214,7 @@ struct Render
ListBase instancetable; ListBase instancetable;
int totinstance; int totinstance;
struct Image *backbuf, *bakebuf; struct Image *bakebuf;
struct GHash *orco_hash; struct GHash *orco_hash;

@ -4665,7 +4665,6 @@ void RE_Database_Free(Render *re)
re->totvlak=re->totvert=re->totstrand=re->totlamp=re->tothalo= 0; re->totvlak=re->totvert=re->totstrand=re->totlamp=re->tothalo= 0;
re->i.convertdone= 0; re->i.convertdone= 0;
re->backbuf= NULL;
re->bakebuf= NULL; re->bakebuf= NULL;
if(re->scene) if(re->scene)

@ -149,7 +149,6 @@ static Render *envmap_render_copy(Render *re, EnvMap *env)
envre->r.layers.first= envre->r.layers.last= NULL; envre->r.layers.first= envre->r.layers.last= NULL;
envre->r.filtertype= 0; envre->r.filtertype= 0;
envre->r.xparts= envre->r.yparts= 2; envre->r.xparts= envre->r.yparts= 2;
envre->r.bufflag= 0;
envre->r.size= 100; envre->r.size= 100;
envre->r.yasp= envre->r.xasp= 1; envre->r.yasp= envre->r.xasp= 1;

@ -2065,35 +2065,6 @@ static void do_render_fields_3d(Render *re)
re->display_draw(re->ddh, re->result, NULL); re->display_draw(re->ddh, re->result, NULL);
} }
static void load_backbuffer(Render *re)
{
if(re->r.alphamode == R_ADDSKY) {
ImBuf *ibuf;
char name[256];
BLI_path_abs(name, re->main->name);
BLI_path_frame(name, re->r.cfra, 0);
if(re->backbuf) {
re->backbuf->id.us--;
if(re->backbuf->id.us<1)
BKE_image_signal(re->backbuf, NULL, IMA_SIGNAL_RELOAD);
}
re->backbuf= BKE_add_image_file(name);
ibuf= BKE_image_get_ibuf(re->backbuf, NULL);
if(ibuf==NULL) {
// error() doesnt work with render window open
//error("No backbuf there!");
printf("Error: No backbuf %s\n", name);
}
else {
if (re->r.mode & R_FIELDS)
image_de_interlace(re->backbuf, re->r.mode & R_ODDFIELD);
}
}
}
/* main render routine, no compositing */ /* main render routine, no compositing */
static void do_render_fields_blur_3d(Render *re) static void do_render_fields_blur_3d(Render *re)
{ {
@ -2105,10 +2076,6 @@ static void do_render_fields_blur_3d(Render *re)
return; return;
} }
/* backbuffer initialize */
if(re->r.bufflag & 1)
load_backbuffer(re);
/* now use renderdata and camera to set viewplane */ /* now use renderdata and camera to set viewplane */
RE_SetCamera(re, camera); RE_SetCamera(re, camera);

@ -502,21 +502,6 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz,
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static void fillBackgroundImage(float *collector, float fx, float fy)
{
collector[0] = 0.0;
collector[1] = 0.0;
collector[2] = 0.0;
collector[3] = 0.0;
if(R.backbuf) {
float dx= 1.0f/(float)R.winx;
float dy= 1.0f/(float)R.winy;
image_sample(R.backbuf, fx*dx, fy*dy, dx, dy, collector);
}
}
/* Only view vector is important here. Result goes to colf[3] */ /* Only view vector is important here. Result goes to colf[3] */
void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short thread) void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short thread)
{ {
@ -626,18 +611,14 @@ void shadeSkyPixel(float *collector, float fx, float fy, short thread)
float fac; float fac;
/* 1. Do a backbuffer image: */ if((R.wrld.skytype & (WO_SKYBLEND+WO_SKYTEX))==0) {
if(R.r.bufflag & 1) { /* 1. solid color */
fillBackgroundImage(collector, fx, fy);
}
else if((R.wrld.skytype & (WO_SKYBLEND+WO_SKYTEX))==0) {
/* 2. solid color */
VECCOPY(collector, &R.wrld.horr); VECCOPY(collector, &R.wrld.horr);
collector[3] = 0.0f; collector[3] = 0.0f;
} }
else { else {
/* 3. */ /* 2. */
/* This one true because of the context of this routine */ /* This one true because of the context of this routine */
if(R.wrld.skytype & WO_SKYPAPER) { if(R.wrld.skytype & WO_SKYPAPER) {