tinygl: fix: endian issue
(cherry picked from commit 3c0a12d30d4032957f21902d3ccd87eb09d949e8)