XEngine Forums Forum Index XEngine Forums
XEngine Discussion Forums
Back to the XEngine project page
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Spirit Parsers and Other Changes in CVS

 
Post new topic   Reply to topic    XEngine Forums Forum Index -> Development & Bug Reports
View previous topic :: View next topic  
Author Message
Asgard
Site Admin


Joined: 26 Nov 2002
Posts: 228
Location: Austria

PostPosted: Sun Aug 17, 2003 8:07 pm    Post subject: Spirit Parsers and Other Changes in CVS Reply with quote

As of now (August 17, 2003) CVS is stable again and buildable with gcc 3.2 and MSVC 7.1.
The recent version of XEngine in CVS requires a compiler with partial template specialization. MSVC 6.5 and 7.0 are no longer supported. Also Spirit 1.6.1 or 1.7.0 is required. The current Boost distribution version 1.30.0 comes with Spirit 1.6.0 which has some problems with skipper parsers not skipping skippable characters at the end of an input stream which causes parsing to fail. Therefore, make sure you grab either Spirit 1.6.1 or 1.7.0 from http://spirit.sourceforge.net and unpack it over the existing Spirit 1.6.0 of the Boost distribution overwriting any existing files.

Please note that the recent changes, albeit making the code clearer and easier to maintain, unfortunately also lead to longer compile and link times. This is especially true for XEngineCore with the Spirit parsers which use a lot of expression templates that are typically hard for compilers and linkers to digest. It might be worthwhile to try and turn off precompiled headers with Visual C++ in the project settings and undefine the XEngine_Precompiled_Headers preprocessor definition as that might give faster build times on some machines. Especially link times with gcc/ld under Linux of XEngineCore are quite long now due to the Spirit parsers. It takes 35 minutes on my machine (Athlon 1.4 GHz with 384 MB RAM) to link XEngineCore Sad
If you're running on Linux you should do a 'make clean' before rebuilding. Additionally, if you have installed the XEngine header files somewhere (e.g. /usr/local/include) you should remove them completely and then replace them because some header files have been moved to different sub directories (see below for details).

On another note, the crashes of the render-to-texture samples that happen with the latest NVIDIA Windows OpenGL drivers (version 45.23) seem to be a driver bug when using VBO buffers that are shared in different rendering contexts since the samples run fine under Linux on the same machine. Therefore, if you use render-to-texture and the OpenGL renderer it might be worthwhile to not upgrade to the 45.23 drivers.

Here's a rundown of all the recent changes:

Changes in XEngineMath:
- Everywhere in the interface where there was a container as argument before there is now a templated pair of begin-end iterators, following STL guidelines.
- Most geometric object classes that existed in two versions, one for 2D and one for 3D, such as Line2 and Line3, have been made templates to avoid code duplication. So now use Line<2> instead of Line2. The existing cubic spline classes have also been made into templates.
- A ControlPointT template parameter was introduced to the SegmentedCurve template class since the values that make up a control point can be different for different types of splines.
- Catmull-Rom and Kochanek-Bartels cubic splines added.
- The ToString methods have all been removed.

Changes in XEngineCore:
- All shading language parsers have been ported to use Spirit; the external tools flex++/bison++ are no longer required to build the engine.
- All shading language-related parsers, translators, parser result classes have been moved into a separate namespace XEngine::Core::ShaderCompilers and also the physical files they are contained in into subdirectories of /src/Core/ and /include/Core respectively.
- The render state source files have been moved from /src/RenderStates to /src/Core/RenderStates and similarly for the corresponding header files.
- Added a parser for ATI_text_fragment_shader.
- Removed the PrimitiveGroup and Mesh iterators. They were not well thought through to begin with and should be proper STL-like iterators when reimplemented. Also I'm considering a policy-based redesign and reimplementation of the Mesh class that will be put into a new XEngine component called XEngineUtil.

Changes in the renderers:
- Adapted the shader classes to use the new parsers.
- Added a translator from ATI_text_fragment_shader to ATI_fragment_shader. This is necessary since ATI's Windows and Linux drivers only support the (functionally equivalent) ATI_fragment_shader but not ATI_text_fragment_shader. The latter is currently only implemented in Mac OS drivers and ATI developer support said that it will likely stay that way.
- Made the OpenGL fixed-function shader class a bit more efficient.
- Fixed the fixed-function fog bug in the Direct3D renderers that was a consequence of a bug in NVIDIA's D3D drivers. Fixed-function fog now works properly on both ATI and NVIDIA hardware (with latest drivers).
- Various fixes and documentation enhancements here and there.

Additionally, the Math samples have been modified according to the changes in XEngineMath, and the XEngineCore samples now use timing to run at the same speed on slower/faster machines or when vsync is turned on/off. They still use idle rendering though.

More rather big changes are coming up soon (in particular, switching to boost::smart_ptrs and STL-ifying XEngineCore).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    XEngine Forums Forum Index -> Development & Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group