[*]Activate the OpenGL context
[*]Map the resource
[*]Deactivate OpenGL context
[*]Do some CUDA work with the pointer you got from the resource
[*]Activate the OpenGL context
[*]Unmap the resource
[*]Deactivate OpenGL context
What I am not sure about here is if i can access the data in the thread with no active OpenGL context and if it will have some consequences.
2 Design choice
- Register the resource in the main Thread < /li>
Передайте ресурс в рабочем потоке < /li>
Активировать контекст Opengl < /li>
Карта ресурса < /li>
выполните некоторую работу с указанием, которое вы получили из ресурса < /li>
unmap the resource < /li> Контекст
хотел бы услышать ваши предложения!
Подробнее здесь: https://stackoverflow.com/questions/797 ... mapped-poi
Мобильная версия