[XEngine-announce] ARB_fragment_program Parser and Other Changes
Status: Inactive
Brought to you by:
martin_ecker
From: Martin E. <mar...@li...> - 2004-11-14 21:40:16
|
Hello, CVS now contains an ARB_fragment_program parser for version 1.0 of the language. Some minor bug fixes were applied to the ARB_vertex_program parser as well. Instead of using raw pointers, instances of the RenderContext and Renderer classes are now also passed around as boost::shared_ptr, just like RenderResource or RenderTarget objects. This makes it easier to write exception-safe client code. RenderContext and Renderer destruction works like this (which has basically not changed): - A Renderer object is destroyed when the last RenderContext that was created by that Renderer is destroyed and the client holds no further shared_ptrs to it. When the Renderer object is destroyed, the corresponding dynamic shared library is automatically unloaded. - A RenderContext object is destroyed when the client releases the last shared_ptr it holds to the RenderContext. - When a RenderContext is destroyed, all RenderResource and RenderTarget objects created by it must have already been destroyed. The debug build will assert if this is not the case. Regarding interaction with wxWidgets there is one important thing to consider: If the wxApp-derived class holds a shared_ptr to a RenderContext (or a RenderResource or RenderTarget), that shared_ptr must be destroyed before wxApp::CleanUp is called. In order to ensure this, either make sure the RenderContext shared_ptr is kept in a wxWindow-derived class or any other class whose objects are destroyed before wxApp::CleanUp is called, or override wxApp::CleanUp in your application class and call reset() on the shared_ptr before making the upcall to wxApp::CleanUp. For an example of this, see the MultiWin sample. Finally, XEngine now uses wxWidgets 2.5.2. Please see install.html in the root directory in CVS for details (and some patches that might need to be applied to wxWidgets). Best Regards, Martin Ecker |