From a50b7dbc3ba1db8c92b4bbb4f7f06de8d6c039c4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 25 Sep 2006 23:57:39 +0000 Subject: Initial work for supporting different renderbuffer color depths at runtime. --- src/mesa/swrast/s_zoom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mesa/swrast/s_zoom.c') 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; -- cgit v1.2.3