On Thu, Sep 22, 2011 at 10:27 AM, Christopher Wright <
christopher_wri...@apple.com> wrote:

> > Is the part that I've put in bold true for all execution modes? Why is it
> that this improves performance if when the patch doesn't contain OpenGL
> code? Related to the last question (basically, the inverse), what happens if
> one forgets to do this that would cause bad performance?
>
> I haven't looked at the document fully (so I could be missing some
> context), but I don't think that statement's true generally.
>

Cool, then my gut impression is correct. I still find the line a little bit
curious, but I'm guessing this is something you would have seen had it
created a negative impact on performance when not expected to.


>
> By itself, CGLMacro.h just defines a bunch of entry point expansions for gl
> functions.  It also pulls in some other GL headers, but unless you're using
> actual GL functionality I don't think it would matter much.
>
> If you forget to include the file and you try to use GL you'll end up doing
> non-direct dispatched gl calls (you'll operate on the current context, which
> isn't necessarily the context QC wants you to use), so you'll probably just
> get bad results (or ok results if you're lucky - don't depend on being lucky
> though, just do the right thing).


Sure, I've made this mistake before in that scenario and have seen the bad
performance results, but I'd always assumed that if it wasn't directly using
OpenGL that it was more correct not to import that. Though I'd read that
line in the documentation before, I'd entirely glossed over it, I guess
because it doesn't seem to be expected.


>  direct dispatch calls will save you a bit of time, but I'd be more
> concerned about correctness before performance.
>
>
>
Correctness being, don't import it if you're not using it? I guess it bears
testing both ways, and I'm definitely not asking for a definitive answer,
but a general guideline (which it seems like you just described!). Thanks
for your thoughts on this one.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to