diff options
author | Brian Paul <[email protected]> | 2006-09-25 23:57:39 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-09-25 23:57:39 +0000 |
commit | a50b7dbc3ba1db8c92b4bbb4f7f06de8d6c039c4 (patch) | |
tree | b1e19031a7563c7da67386584a7e42a4603c4ba1 /src/mesa/swrast/s_zoom.c | |
parent | df8632ebd87219c809810d993f56fef1e6853a25 (diff) |
Initial work for supporting different renderbuffer color depths at runtime.
Diffstat (limited to 'src/mesa/swrast/s_zoom.c')
-rw-r--r-- | src/mesa/swrast/s_zoom.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index 3fd914083f9..77cf8ca899f 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -144,6 +144,18 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const struct sw_span *span, zoomed.x = x0; zoomed.end = zoomedWidth; zoomed.array = &zoomed_arrays; + zoomed_arrays.ChanType = CHAN_TYPE; +#if CHAN_TYPE == GL_UNSIGNED_BYTE + zoomed_arrays.rgba = zoomed_arrays.color.sz1.rgba; + zoomed_arrays.spec = zoomed_arrays.color.sz1.spec; +#elif CHAN_TYPE == GL_UNSIGNED_SHORT + zoomed_arrays.rgba = zoomed_arrays.color.sz2.rgba; + zoomed_arrays.spec = zoomed_arrays.color.sz2.spec; +#else + zoomed_arrays.rgba = zoomed_arrays.color.sz4.rgba; + zoomed_arrays.spec = zoomed_arrays.color.sz4.spec; +#endif + /* copy fog interp info */ zoomed.fog = span->fog; |