Added support AuxFloat in add_render_texture

This commit is contained in:
Bei Yang 2010-08-26 19:21:00 +00:00
parent c92649bb64
commit cec641bea1

View File

@ -344,9 +344,18 @@ add_render_texture(Texture *tex, RenderTextureMode mode,
(plane == RTP_aux_hrgba_3)) {
tex->set_format(Texture::F_rgba16);
tex->set_match_framebuffer_format(true);
} else
{
} else if ((plane == RTP_aux_float_0)||
(plane == RTP_aux_float_1)||
(plane == RTP_aux_float_2)||
(plane == RTP_aux_float_3)) {
//defaults to rgba16 unless rgba32 is set. Since many older hardware doesn't
//support 32 or filtering on 32
tex->set_component_type(Texture::T_float);
if( tex->get_format() != Texture::F_rgba32 ){
tex->set_format(Texture::F_rgba16);
}
tex->set_match_framebuffer_format(true);
} else {
display_cat.error() <<
"add_render_texture: invalid bitplane specified.\n";
return;