Those checks are to prevent crashes when making GL calls without a context. On the Mac side the context is created with the first window creation so any object with GL calls in the creator method will often crash when loading a patch before having a window. Jamie has done something which creates a context when GEM loads and removes the need for these checks but I don't know if it's tested and ready or not.
cgc
On 1/30/06, IOhannes m zmoelnig zmoelnig@iem.at wrote:
hi all.
i am currently skipping through the code and trying to replace pre-processor checks by runtime checks.
i see a lot of references to HaveValidContext() in __APPLE__. i think some of them are obsolete or leftovers.
what bothers me a bit is, that whenver HaveValidContext is used, there is also an include for <AGL/agl.h>. is this necessary or is it just a copy'n'paste leftover? (i think there is nothing special in most of these files which would require AGL)
also i noticed that <Carbon/Carbon.h> and <AGL/agl.h> are included using the #import directive, which i think is ugly. are these 2 files save to include more than once?
mf.asdr IOhannes
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev