How to get glu source code

Started by
13 comments, last by Kai Sharp 16 years, 9 months ago
Is glu source code avaliable? Not understand how hight level Nurbs APIS connected with evaluator, I think maybe I need to take a look at the source code. Is OpenGL Open source? I didn't find the source code in OpenGL.org.
Advertisement
OpenGL is not open source (this is a common misconception). The code for the GL implementation you are probably using is not available.

That said, there are open-source implementation of the OGL spec. Look up Mesa 3D, or the source code to a Linux implementation of GL.
Try

http://www.koders.com/c/fid6A9086D4244A3B5B4E24C96CA892AC576F78BBBE.aspx

It has a few bits of code for a ps2 dev kit I think, shows how one could make gluLookAt in that link, but has a sidebar with all the various OpenGL functions.

Whether they are correct are not I cannot say though.

neutrinohunter
Er, that code is not relevant at all. 90% of it is a wrapper around what appears to be a PSP graphics library (I hope, for your sake, a legal one, I haven't bothered to check). And it doesn't contain any of the GLU curve evaluator functions.

(To the OP: Have you examined what the Red and Blue books have to say on the subject? You might not need to go source diving to find what you want)
http://mesa3d.org/, there is a link to GLU's source code o the left side.

If I were you, I would look elesewhere for a nicely optmized NURBS lib.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by Neutrinohunter
Try

http://www.koders.com/c/fid6A9086D4244A3B5B4E24C96CA892AC576F78BBBE.aspx

It has a few bits of code for a ps2 dev kit I think, shows how one could make gluLookAt in that link, but has a sidebar with all the various OpenGL functions.

Whether they are correct are not I cannot say though.

neutrinohunter


Thank you all the same. I do get some valuable code samples in Koders.com.
Quote:Original post by jpetrie
Er, that code is not relevant at all. 90% of it is a wrapper around what appears to be a PSP graphics library (I hope, for your sake, a legal one, I haven't bothered to check). And it doesn't contain any of the GLU curve evaluator functions.

(To the OP: Have you examined what the Red and Blue books have to say on the subject? You might not need to go source diving to find what you want)


It's far better to get some reply, no matter what they are.
There is a search engine on that page, and I searched gluNurbsCurve and got a page of GLNurbs, there is a private variable named curveEvaluator.But I haven't get the detailed implement code yet.

Thank you!
Quote:Original post by V-man
If I were you, I would look elesewhere for a nicely optmized NURBS lib.


Very great idea! Thanks a lot.

I'm a student , so I hope I could find some free lib.



I would really recommend rolling your own NURBS code. Firstly, NURBS are horrible when you don't understand the mechanics behind them, secondly GLU's doesn't do many things one typically needs with NURBS, and thirdly, GLU is a very strange beast that doesn't exist in all GL implementations (or at least is stuck with an old version) and seems to be on the verge of dying out.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by V-man
If I were you, I would look elesewhere for a nicely optmized NURBS lib.

And you may look a long time. I spent quite a while about a year and a half ago trying to find a nice NURBS library, coming to the conclusion that nobody was interested. There are quite a few implementations floating around (mostly tied to a particular processor family for optimisation), but very few 3rd party NURBS libraries, and almost none that support sufficient flexibility for most uses.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement