Jean-Francois Panisset wrote:
>
> <[EMAIL PROTECTED]>Brian Paul writes
> >
> >However, I'm likely to convert to #defines for the next version
> >of Mesa. I was recently stung by an incompatibility between
> >real enums and #defines when using C++.
> >
> >What happens if you replace the enums in glu.h with #defines?
> >I haven't done the conversion myself yet.
> >
>
> It works fine with #defines instead of enums, but the other problem
> is that by defining GLenum as a real enum, you also get the problem
> that the following oft-used idiom:
>
> GLint mmode;
> glGetIntegerv(GL_MATRIX_MODE,&mmode);
> ...
> glMatrixMode(mmode);
>
> no longer works in g++ 2.95.2 without a cast:
>
> glMatrixMode((GLenum)mmode);
>
> The solution would be to redefine all of the GLenums as #defines, and
> change GLenum to be:
>
> typedef unsigned int GLenum;
>
> as in the IRIX gl.h. Does this make sense?
Yes, it does. I wasn't planning on doing this in Mesa 3.1 since
it's in feature freeze. Can you a wait a bit for the change in
Mesa 3.3?
-Brian
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev