Added GlState object as GLES compatible replacement for pushattrib / popattrib.