Fixed invalid cast in shader and improved GL attribute type to name conversion

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>

The huge switch statement was a bit hidden, it can be possible that types need to be evaluated in other locations as well. An IntObjectHashMap is used to map GL type IDs to their respective names.