Tuesday, January 20, 2009

Bicubic patch meshes

Some progress with RibRender.. I've got the bicubic patch meshes somewhat working.

See the airplane. Including the elephant image too, though that's using just bicubic patches (not meshes).. but it's cool anyway 8) And it renders properly because I fixed some transformation state machine bug that I had lingering around.
I also changed the rendering to retained mode: primitives are collected, state machine snapshots are stamped onto primitives, and everything is rendered when the whole scene description is finished (at WorldEnd time).
A graphic state is only saved when changed and being referenced by one or more primitives (state change detection is based on a simple counter, a simplistic approach, but better than nothing for now).

Xcode has been a mixed experience so far. I like the editor predictive feature (I enabled it all the way to suggest me what I may be want to write right away).
The IDE layout is a bit painful to use: windows opened all over the places, I really miss being able to switch between recent source files with CTRL+TAB.
Refactoring for C++ isn't possible at all (Visual Studio can't do this neither, but Visual Assist X can, and it's a great time saver to cleanup/refactor code !).

Worst of all Xcode debugger seems rather ancient (based on GDB, which should be good, but the interface surely shows little).
I had a very hard time trying to debug STL vectors.. there is some option out there to improve vectors debugging (-D_GLIBCXX_DEBUG), but that didn't really work in my case.
I generally can't see the vector's content, sometimes I can see the start pointer and end pointer.. but I can't find a way to get the debugger to show a list of items from that pointer (CodeWarrior on PS2 had this "View As Array of.." option, while with Visual Studio one can use something like pItems,16  to see an array of 16 elements out of a pointer).

Now I have some crashes, but, unlike with Visual Studio, Xcode debugger doesn't throw me in the hot spot... in fact I just came back from a machine reboot: the application crash while running in the debugger left me only with a moving mouse pointer, while the system UI was deadlocked.

Ummmmmmm... I'm clearly a newbie with Xcode, but I have the feeling that the debugger truly isn't at the level of the Visual Studio one... and in the long run that will become a serious issue, a reason alone to start aiming at multi-platform and develop mostly under Windows (possibly emulated under OS X 8).