create context
create memory buffer