googling for this i found an article here:
The main part in there:
General order of things:-
glBindBuffer(pbo) ======> Notice NO glMapBuffer
glTexSubImage(…, (last parameter = NULL))
glBindBuffer(0) =====> Unbind buffer
Draw textured quad here
It works for me if i create the texture in initialization, but not if i render to it cyclically.
I also have some doubts about about some parts in there, it tells me to glBindTexture(pbo).
glGenBuffers() and glGenTextures() creates names that it can’t distinguish, e.g. creating two textures gives [1, 2] and creating two buffers also gives [1, 2]. So i wonder if this part is correct?
Also, i wonder what i need to do once at initialization and what i need to do cyclically to update the texture? To my understanding i can only do cudaGLRegisterBufferObject() once and the rest must be done each time i want to update the texture.
Is a call to glBindTexture() with a PBO correct / valid?
What can i do once and what do i need to do cyclically?
Thanks for any hints,