Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 09 May 2003
Offline Last Active Jun 26 2011 06:57 AM

Topics I've Started

Boost.test - howto?

18 September 2008 - 02:53 AM

i wanted to use unit tests for a library i'm just writing and i decided for boost.test mostly because it has a good reputation and will most likely still be supported in a few years (as my project is supposed to be very long-lived). but unfortunately i already run into problems just implementing the most basic examples. eg.:
#include <my_class.hpp>
#include <boost/test/unit_test.hpp>

    my_class test_object( "qwerty" );

    BOOST_CHECK( test_object.is_valid() );

this won't link, because main is undefined (i dynamically linked the lib). now, of course i know there must be a main somewhere. but on several occasions the doc mentions it's automatically produced by boost.test. when i include <boost/test/included/unit_test.hpp> instead, it works. the doc also mentions function like unit_test_main and what not, you may have to define yourself but all in all it's still completely unclear to me, how the whole system works and what i really need to get anything up and running. disappointingly, the doc seems mostly incomplete, with many not-working examples, dead links/images...and many typos. now, since this is a boost lib where talking about here, it's probably my fault. i hope. otherwise i might resort to CxxTest. that seems to work ootb like a charm. but the last version is already a few years old and who knows if there will be an update someday (eg. to adept to the new C++ standard).

stereoscopic rendering with software-pageflipping

23 July 2008 - 01:06 AM

hi, i'm looking for a possibility to produce output for VR glasses without being bound to a graphics card supporting true stereo support. i have to render seperate images for the left and right eye with both images flipping after every vertical blank. of course, the problem is that there is no vblank interrupt (or is there?!). implementing this thing with timers and multiple threads seems pretty messy, foremost because timer and threading granularities aren't overly good either. there is this nice Stereoscopic Player that is actually able to produce suitable output without any hardware support (Software Pageflipping), so i guess it's possible somehow (although the player propably doens't use oGL). anyone got an idea on that?

boost::array style fixed-size template data containers

18 July 2008 - 07:57 AM

so, i'll be doing some console development again and one thing that puzzles me is the use of the STL. unfortunalty, using the STL is mostly considered evil in this area, since it constant memory (de-)allocations fragment the heap quickly. a possible solutions came to my mind, when i saw the boost::array container. it uses a template argument to control the size and doesn't need any dynamic heap allocations. i could imagine extending this approach to more sophisticated containers like strings, lists or maps with a template parameter controlling the maximum number of objects (who are internally stored in an fixed-size array). but one thing puzzles me: won't this introduce a massive template overhead? boost::array claims to introduce zero overhead over plain arrays, but after all the compiler has to make a new specialization not only for every type the container is used with (like with the STL containers), but also for every size used. while this may be not so dramatic for the rather small boost::array class, i could imagine a massive code bloat for more complex containers - maybe too much for smaller systems? i could also imagine a page-fault related performance penalty due to increased code size... any ideas on this? i also looked around for libs that implement this, but although embedded developers could make use of something like that (as opposed to plain fixed-size (char) arrays) i couldn't find anything in this direction.

parabola: bresenham - like algo wanted

28 July 2007 - 10:27 AM

hi, i spend pretty much the whole day implementing a parabola rasterization algorithm (well, mostly on idiotic bugs...). it's done mostly in a naive way, iterating over x or y (depending on slope). now, the problem is that there are sometimes holes in it when the slope changes and i don't really see a way to fix it. i went back to google, trying to find some nice, working algo but except lots of pages claiming that you could do it somehow similar to bresenham (circles / ellipses) i haven't found one single source on actually implementing it. so, has anyone something at hand?

[3ds max] loft extrusion

04 April 2007 - 02:18 AM

hi, i'm trying to model a plane (sopwith camel) and the loft extrusion to create the hull is driving me mad. i created several profile shapes and a line with a bend as a path. but the extrusion just doesn't act as expected. instead ob making a bend up (+y), it makes a bend sidewards [help] loft extrusion