开发者

Does glSubTexImage block?

This is a question about syncronization in OpenGL. And the question is:

At which point in the following (pseudo) code sample does syncronization happen.

// 1.
try to map buffer object开发者_开发百科 (write only and invalidate buffer)
  copy new data to mapped buffer   
unmap buffer

// 2.
bind buffer
  call subteximage to fill texture from buffer
unbind buffer

// 3.
render with texture

As far as i know syncronization happens as soon as 'an object is used'. Now it's questionable if the texture is used if it is filled from the buffer or if it is used in rendering.

If glSubTexImage doesn't block it would be possible to generally stream texture data by using buffer updates in texture update calls.

Florian


Your code can block anywhere between copy and glFlush after render with texture (or frame buffer swap). It's up to the implementation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜