thread 2:
create mesh geo in memory
glBufferData to create a vbo
send msg to thread 1 with VBO ID
thread 1:
while(1)
{
if we get a msg
insert VBO into scene graph
draw scene graph
}
Or how about this logic, which uses threads and PBOs to asynchronously capture full screen to disk?
thread 1:
render frame
bind pbo
glReadPixels
unbind pbo
send msg to thread 2
thread 2:
wait for message
bind pbo
get pbo data
unbind pbo
write data to disk
Hint: the answer is the same!
No comments:
Post a Comment