Fixed the resample and texture bindings problems