Add missing allocations.

Memory should be allocated before buffer and texture used.
Merge pull request #82 from alldne/initialization

Add missing allocations.