forked from bartvdbraak/blender
remove backbuf from internal struct's (unused in 2.5x)
This commit is contained in:
parent
c2e1f3a1e2
commit
a3101de7be
@ -253,19 +253,12 @@ typedef struct RenderData {
|
||||
*/
|
||||
short yparts;
|
||||
|
||||
short winpos, planes, imtype, subimtype;
|
||||
|
||||
/** Mode bits: */
|
||||
/* 0: Enable backbuffering for images */
|
||||
short bufflag;
|
||||
short quality;
|
||||
short planes, imtype, subimtype, quality;
|
||||
|
||||
/**
|
||||
* Render to image editor, fullscreen or to new window.
|
||||
*/
|
||||
short displaymode;
|
||||
|
||||
short rpad1, rpad2;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
float xasp;
|
||||
/**
|
||||
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
|
||||
*/
|
||||
float yasp;
|
||||
float xasp, yasp;
|
||||
|
||||
float frs_sec_base;
|
||||
|
||||
@ -349,7 +338,7 @@ typedef struct RenderData {
|
||||
short bake_normal_space, bake_quad_split;
|
||||
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];
|
||||
|
||||
/* stamps flags. */
|
||||
|
@ -214,7 +214,7 @@ struct Render
|
||||
ListBase instancetable;
|
||||
int totinstance;
|
||||
|
||||
struct Image *backbuf, *bakebuf;
|
||||
struct Image *bakebuf;
|
||||
|
||||
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->i.convertdone= 0;
|
||||
|
||||
re->backbuf= NULL;
|
||||
re->bakebuf= NULL;
|
||||
|
||||
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.filtertype= 0;
|
||||
envre->r.xparts= envre->r.yparts= 2;
|
||||
envre->r.bufflag= 0;
|
||||
envre->r.size= 100;
|
||||
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);
|
||||
}
|
||||
|
||||
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 */
|
||||
static void do_render_fields_blur_3d(Render *re)
|
||||
{
|
||||
@ -2104,10 +2075,6 @@ static void do_render_fields_blur_3d(Render *re)
|
||||
G.afbreek= 1;
|
||||
return;
|
||||
}
|
||||
|
||||
/* backbuffer initialize */
|
||||
if(re->r.bufflag & 1)
|
||||
load_backbuffer(re);
|
||||
|
||||
/* now use renderdata and camera to set viewplane */
|
||||
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] */
|
||||
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;
|
||||
|
||||
/* 1. Do a backbuffer image: */
|
||||
if(R.r.bufflag & 1) {
|
||||
fillBackgroundImage(collector, fx, fy);
|
||||
}
|
||||
else if((R.wrld.skytype & (WO_SKYBLEND+WO_SKYTEX))==0) {
|
||||
/* 2. solid color */
|
||||
if((R.wrld.skytype & (WO_SKYBLEND+WO_SKYTEX))==0) {
|
||||
/* 1. solid color */
|
||||
VECCOPY(collector, &R.wrld.horr);
|
||||
|
||||
collector[3] = 0.0f;
|
||||
}
|
||||
else {
|
||||
/* 3. */
|
||||
/* 2. */
|
||||
|
||||
/* This one true because of the context of this routine */
|
||||
if(R.wrld.skytype & WO_SKYPAPER) {
|
||||
|
Loading…
Reference in New Issue
Block a user