Page 1 of 1

Q Prefix?

Posted: Sun Mar 11, 2007 8:27 am
by Silicone_Milk
So I was just looking through the Q3 source code and found a file that renamed opengl functions by giving them a q prefix.
Something like this:

#define qglStencilMask glStencilMask

What exactly is the point of such a seemingly significant waste of time/code? (note that there's a whole list of these redefinitions. Even bool is redefined!)

So what's up guys? Is it iD just being quirky? Is it a copyright thing? Or was it for having a semi-uniform naming scheme?

I'm just kinda interested since it looks kinda silly to me.

Posted: Sun Mar 11, 2007 12:16 pm
by ^misantropia^
It's a simple abstraction layer on top of OpenGL. Comes in handy when you want to write e.g. a software renderer like in Q1 and Q2.

Posted: Sun Mar 11, 2007 4:29 pm
by Silicone_Milk
I see.
Kinda ironic that they would do that considering Q3 doesn't have a software renderer :)

Thanks for the reply ^misantropia^