Problem with OpenGL and ATI HD3850

Norbert Papke npapke at acm.org
Thu Apr 30 01:09:10 UTC 2009


On April 29, 2009, Roland Smith wrote:
> >         assert(pcVer && "Problems getting GL version string using
> > glGetString"); printf("ogre 110.1\n");
>
> The assert is weird. Why take an AND of pcVer and a string? Since the
> string is a constant non-null value, using the standard && operator is
> useless. Is the && operator overloaded by any chance? That could cause the
> trouble.

You are correct.  However. the most likely reason for including the string 
inside the assert() macro is for diagnostics.  If pcVer were false, the macro 
would cause something like the following to be written to stderr:

  Assertion failed: pcVer && "Problems getting GL version string ussing 
glGetString", ...

Cheers,
 
-- Norbert Papke.
   npapke at acm.org


More information about the freebsd-x11 mailing list