85 |
|
refDepth = 1.; |
86 |
|
Init(bp, ystride, dp); |
87 |
|
} |
88 |
+ |
PixelAccess(COLORV *rp, int ystride, short *dp) { |
89 |
+ |
refDepth = 1.; |
90 |
+ |
Init(rp, ystride, dp); |
91 |
+ |
} |
92 |
|
void Init() { |
93 |
|
pbase.f = NULL; dbase.f = NULL; |
94 |
|
rowStride = 0; |
126 |
|
} |
127 |
|
if (dp) dtyp |= RDTdshort; |
128 |
|
} |
129 |
+ |
void Init(COLORV *rp, int ystride, short *dp) { |
130 |
+ |
pbase.f = rp; dbase.s = dp; |
131 |
+ |
rowStride = ystride; |
132 |
+ |
if (NCSAMP > 3) { |
133 |
+ |
dtyp = RDTscolor; primp = NULL; |
134 |
+ |
} else { |
135 |
+ |
dtyp = RDTrgb; primp = stdprims; |
136 |
+ |
} |
137 |
+ |
if (dp) dtyp |= RDTdshort; |
138 |
+ |
} |
139 |
|
/// Set color space after non-empty initialization |
140 |
|
bool SetColorSpace(RenderDataType cs, RGBPRIMP pr=NULL); |
141 |
|
/// Get color space |
339 |
|
/// Increments frameNo if >0 |
340 |
|
bool NewFrame(const VIEW &v, int xydim[2], double *ap=NULL, |
341 |
|
const int *tgrid=NULL); |
342 |
+ |
/// Get current view if set |
343 |
+ |
const VIEW * GetView() const { |
344 |
+ |
if (!vw.type) return NULL; |
345 |
+ |
return &vw; |
346 |
+ |
} |
347 |
+ |
/// Writeable previous view (for motion blur) |
348 |
+ |
VIEW & PreView() { |
349 |
+ |
return pvw; |
350 |
+ |
} |
351 |
|
/// Get current picture width |
352 |
|
int GetWidth() const { |
353 |
|
return hvres[0]; |
375 |
|
const int *tile=NULL); |
376 |
|
/// Same but also use 16-bit encoded depth buffer |
377 |
|
bool RenderTile(COLRV *bp, int ystride, short *dp, |
378 |
+ |
const int *tile=NULL); |
379 |
+ |
/// Back to float color with 16-bit depth |
380 |
+ |
bool RenderTile(COLORV *rp, int ystride, short *dp, |
381 |
|
const int *tile=NULL); |
382 |
|
/// Render and write a frame to the named file |
383 |
|
/// Include any header lines set prior to call |