April 2005 - Posts
Strange bug in OpenGL today, some guys did code a routine to intelligently compute the far distance (I guess by getting the maximum distance to all vertices in the scene, didn't bother to check this but I take the best case). However the visual effect was interesting, the far clip plane was moving almost randomly. Of course I removed it and replaced with some big but fixed constant, while feeling bad for cutting some potential intelligent coding. Did they write it in the 16-bit zbuffer era? Anyway, now in 24-bit there's no need for it.
But what's so cool with Cocoa and Xcode is the Interface Builder and the MVC pattern. Basically one can implement much of the functionality just by dragging and connecting objects. So by using the NSArrayController class it shouldn't take more than 2 minutes to design simple add/remove functionality on a list(array) of objects (that are stored in an internal array ready to be used in the code, later). It's definitely this will be the path in my next project, also writing some other really useful and flexible controllers is necessary (something like a NSTreeController to manage a tree-like structure in the code). Oh, and you can bind undefined fields of one object (later, those fields will be implemented with Objective-C code in the class) to other fields (even from standard controls also like edit box value). So Cocoa is a very nice step in the good direction (me coming from MFC), even if the C++ interfaces are missing.
Ok, so Real Basic is out as it would be Visual Basic on the PC platform, Carbon is out because of its similarity with Win32 API, ObjectiveC/Cocoa and C++/CodeWarrior Powerplant are in the final. Unfortunately for Metrowerks, CodeWarrior lost before I even looked at it (didn't manage to download it in 5 days). Meanwhile, I started getting used with Objective-C, and the horrid syntax is now pretty familiar. The guys closer to Lisp / Scheme would really enjoy it.