Add missing allocations.

Memory should be allocated before buffer and texture used.