Re: How to set deepth buffer in osmesa?

Brian Paul <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Organization VMware, Inc.
Message-ID <[email protected]>
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.

-Brian

_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.