On 8/23/07, Shane Blackett <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have had a go at cleaning up better,
>
> adding update_default_objects to context.c.
> It is calling new functions mesa_update_default_objects_program and
> mesa_update_default_objects_texture to update those defaults.
>
> It made sense to me to make new functions in the appropriate files
> rather than starting to put all the update code in context.c
>
> I am trying to release the old shared state after creating the new
> one so that we can make one call to each of the various modules and they
>   can remove references to old objects and bind to the new ones.
> Otherwise when the shared state was destroyed, the objects may also have
> been destroyed.
> I am a bit worried about calling free_shared_state with the context now
> pointing at a different share, hopefully that is OK.
>
> For the buffer objects, I have rebound the NullBufferObj by calling
> bind.  I had to move the binding code to a static function so that it
> does not require the context to be current.
>
> Is this the sort of thing you would like for all the objects which may
> be referenced from a hash in the Shared list?

I think this looks about right.  I'll apply the patch to the master
branch.  I recently made some improvements to the texture object
reference counting code that will factor into this.  Is it important
to you that the 7.0.x branch get these changes?


> I notice that the wglShareLists definition from MS states that the
> context which is going to share should not already contain any display
> lists (or other objects?), implying that to conform to this maybe we
> don't need to worry to much about unbinding objects?
>
> http://msdn2.microsoft.com/en-us/library/ms537565.aspx
>
> What would you like?

That constraint could simplify the implementation a bit but I'm happy
with a "safer" solution like what you've done.  In any case, maybe we
should add checks to see if the 'hglrc2' context has any dlists,
texobjs, etc. and issue a warning/error if any are found.

-Brian

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to