|
From: James W. W. <os...@jw...> - 2004-04-18 21:39:49
|
On Apr 18, 2004, at 1:48 PM, Dair Grant wrote: >> However some Quesa internal functions would need an extra >> parameter. > > Plus we'd need extra local variables, if I understand the setup > correctly, i.e., we'd have to have a local agl_ctx in each routine that > made a GL call which was initialised to the context in the instance > data? No, not really. For example, to make the change in IRUpdate.c, I added the following to the top of the file: #if QUESA_OS_MACINTOSH #define agl_ctx ((AGLContext)instanceData->glContext) #if TARGET_RT_MAC_MACHO #include <AGL/aglMacro.h> #else #include <aglMacro.h> #endif #endif It so happens that everywhere you need the context, you have an instanceData variable by which one can access the GL context. In some other source files, I defined agl_ctx as ((AGLContext)glContext) instead. > A 6% change isn't normally something to ignore, but I'd be curious to > see if you get any impact in other tests? > > The multibox test I'd expect to spend most of its time updating the > view > stack: i.e., showing the cost of per-object processing within Quesa > rather than rendering time (and a lot of that is probably the bogus > view > state stack updates on pop). > > Normally this only really helps for immediate mode drawing, where > you're > doing N-thousand glVertex calls or whatever: as Frank says that's the > case for the transparent path, but shouldn't happen normally. > > So I'm kind of surprised you did get anything out of it actually. :-) > > > -dair (I wonder if the place we're saving the time is in IRUpdate.c: we > probably make more GL state calls in there than we do GL drawing calls, > and I bet most of them are happening because of the excessive view > state > stack updates) There's enough variation in frame rate that it's possible that what I thought was an improvement was actually experimental error. I'll hold off on this, and take another look after the view state stack stuff has been addressed. -- <http://www.jwwalker.com/> |