The OpenGL documentation for GLU says that the second parameter of gluBuild2DMipmaps is the number of components. However, reading an NVIDIA example, and checking in this forum, I saw that this parameter can be used as the texture’s internal format (which is very helpful). Someone mentioned that this is since GLU 1.3.
How can I know if the parameter can be used in this way? Is this supported in older Windows implementations (Windows 95 and NT4)? Is there a runtime check I can make to be sure that this form of the call is supported? I don’t want to use this feature if I don’t know that it’s guaranteed to work.
Thanks, cass. Yes, I thought about using it - especially for textures that are generated dynamically. But I’m not optimising for speed yet, and I’d like the program to work on as many cards as possible.
And after thinking about the above a little, querying the GLU version at runtime doesn’t seem to do much good. Yes, gluBuild2DMipmaps may be a little faster than doing the scaling using several GL calls, but OTOH I’ll have to implement both methods - resulting in more complicated code.
The main benefit of gluBuild2DMipmaps, as I see it, is in its simplicity. If I can’t be sure that I have the right version when I write the code, then I don’t gain this benefit.
What does the version of GLU depend on? Is it the Windows glu32.dll, or a result of the ICD used? If it’s Windows based, what Windows versions support this functionality?
[This message has been edited by ET3D (edited 04-23-2001).]
Originally posted by mcraighead:
[b]You can always specify an internal format. GLU doesn’t care what internal format you specify – it’s internal to the driver. GLU only cares about the type and format.
But the parameter is not “internal format” it is “number of components”. What I think you’re saying is that this parameter always went directly to glTexImage2D’s “internal format” parameter. This makes some sense, since the constants 1,2,3,4 indeed translate to formats with 1,2,3,4 components when used with glTexImage2D. It’s still be nice to know if this is official behaviour, and there’s no chance of bumping into some GLU check that will foil the attempt to use an internal format.