fixing some memleaks
copy-paste error
add assert in case ftell fails
fix typo
fix coverity issues
Merge remote-tracking branch 'upstream/master'
Shadow: reenable shadows

It's just plain basic shadowmaps, a lot of tweak is still necessary but
it gives a way to see how light values are affected in some places.
(cave in chocolate for instance)
Shadow: Better bias.
Shadow: soften edge a little
Shadow: Fix broken specular with shadows enabled.
Lights: Remove unused export value.
Shadow: Support for alpha tested meshes.
Shadow: Grass now cast shadows.
Fixed running on hd3000 (8192 was too big for my system, not sure
what values should be used best, I used the previous code here).
Revert "Fixed running on hd3000 (8192 was too big for my system, not sure"

This reverts commit 748dcf1e15e1a33100f90a615e546765307fdf58.
Shadow: very crude csm support
Shadow: Tweak bias
Create a BO with texture_2d_array for shadows.
Merge pull request #37 from KroArtem/master

Fix coverity issues (memleaks, copy-paste error)
Shadow: Use Geometry Shader for better perfs.

The 3 cascades are now rendered in a single pass, using 2D array texture and
a GS to do the dispatch ("layered rendering").
It's possible to use instancing instead but it requires the AMD_vertex_shader_layer
extension which is oddly part of opengl 4.2.