[Mesa-users] How to set deepth buffer in osmesa?
brianp at vmware.com
Tue Dec 20 07:17:18 PST 2011
On 12/20/2011 02:25 AM, michael_cpvs wrote:
> Hi everyone:
> I'm a beginner for osmesa, Is there any function to set the deepth
> buffer for a osmesa context? I mean if I've been got a depth buffer
> from other osmesa context, how do I set this depth buffer to the
> current context and let the current context continue to draw a scence
> on this depth buffer? Or there is an alternative way, that is, could I
> share the depth buffer and image buffer between serveral osmesa context?
> Thanks for your help : )
In OSMesa, depth buffers are associated with contexts so there's no
really good way of doing this without some copying.
The OSMesaGetDepthBuffer() gives you a pointer to a context's depth
buffer values. You could call that to get the pointer to context A's
buffer, then bind context B, call the function again to get B's depth
buffer, then memcpy from the former to the later.
More information about the mesa-users