PDA

View Full Version : WGL_ARB_render_texture & multithread



iamjaded
09-12-2009, 01:20 AM
WGL_ARG_render_texture spec does not mention how to handle multithread. If application call wglBindTexImageARB(hPbuffer, xx) to gc's texObj1 in thread1, later it call wglReleaseTexImageARB in another thread(thread2), but maybe gc is still running within thread1, what will happen for this case?

I didn't find any clues for such case?

Can anyone give me some hints?

thanks,
jaded

iamjaded
09-12-2009, 01:30 AM
per WGL_ARB_render_texture, wglReleaseTexImageARB just like glTexImage with zero width which means it just like an opengl api. But context is single-threaded. so how to handle it?

Jan
09-12-2009, 02:13 AM
That's pbuffer stuff and no one uses pbuffers anymore. Use framebuffer objects (ARB_framebuffer_object - FBO for short).

I think the spec also talks a little bit about multithreading, not much though.

Jan.

iamjaded
09-12-2009, 02:26 AM
Jan,

Can you point out where of the spec talk about multithreading?

thanks,
jaded

mfort
09-12-2009, 09:55 AM
Do not try multi-threading with FBO on NVIDIA.
It is reliable crash dump generator.

iamjaded
09-13-2009, 06:39 AM
actually, i just want to know how to handle multithreading of arb_render_texture in driver.

Alfonse Reinheart
09-13-2009, 12:01 PM
actually, i just want to know how to handle multithreading of arb_render_texture in driver.

You don't. You shouldn't be using ARB_render_texture to begin with. And you can't really multithread OpenGL in the way you are trying.