From: Mikko Rasa Date: Thu, 11 Jul 2019 22:22:02 +0000 (+0300) Subject: Add feature check for array texture samplers X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=dad209400d4e5d39076d949364f598b854c7a5d7 Add feature check for array texture samplers --- diff --git a/source/programcompiler.cpp b/source/programcompiler.cpp index 00d217a0..989098d7 100644 --- a/source/programcompiler.cpp +++ b/source/programcompiler.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -1954,6 +1955,26 @@ void ProgramCompiler::LegacyConverter::visit(FunctionCall &call) call.name = "shadow1D"; else if(type=="sampler2DShadow") call.name = "shadow2D"; + else if(type=="sampler1DArray") + { + check_extension(EXT_texture_array); + call.name = "texture1DArray"; + } + else if(type=="sampler2DArray") + { + check_extension(EXT_texture_array); + call.name = "texture2DArray"; + } + else if(type=="sampler1DArrayShadow") + { + check_extension(EXT_texture_array); + call.name = "shadow1DArray"; + } + else if(type=="sampler2DArrayShadow") + { + check_extension(EXT_texture_array); + call.name = "shadow2DArray"; + } for(; i!=call.arguments.end(); ++i) (*i)->visit(*this);