Stewart Taylor writes:
On Sunday 14 July 2002 19:20, Jesse Marlin wrote:
What kinds of errors? Show me the output.
I've put the output at the end.
Is that the red book? That is the one I have heard is good. The one I own is "OpenGL Programming for the X Window System", and it has a green cover. Depending on what you are planning to do, using the GLUT toolkit should be adequate. So any book that discusses GLUT and OpenGL should be good enough to get you going. The book I have shows how to use the GLX interface and also GLUT.
One is red the other blue. Can you please give me the isbn for "OpenGL Programming for the X Window System" so I can have a look. What is the difference with using GLX as opposed to glut?
ISBN: 0201483599 When programming in X you have to develop an Event model. A way to handle X events. Usually this is an infinite while loop that only exits when the program exits. Windows has a similar model. What glut tries to do is using the native windowing calls (WGL or GLX) it tries to provide an event model that will work on either X or Windows. You may not give a hoot about Windows but glut greatly simplifies programming in X with OpenGL. But if you need to do something that glut does not provide then you have no choice but to use the GLX calls.
Stewart
The output
stewart@linux:~> gcc -c -g /home/stewart/test/kock.c >~/output.txt In file included from /home/stewart/test/kock.c:6: /usr/include/GL/glu.h:261: parse error before `*' /usr/include/GL/glu.h:263: syntax error before `void' /usr/include/GL/glu.h:263: warning: data definition has no type or storage class
It almost looks like there is no gl.h. Do you have gl.h, glu.h, and glut.h? Did you copy everything from NVIDIA_GLX-1.0-????/usr/include/GL/ to /usr/include/GL? If you have mesa installed then that should be sufficient to use. The NVidia headers will probably be more up to date with their latest extensions. Here is a list of all the files I have:
ls /usr/include/GL gl.h gle.h glu.h glut.h glx.h glxtokens.h
/usr/include/GL/glu.h:264: syntax error before `void' /usr/include/GL/glu.h:264: warning: data definition has no type or storage class /usr/include/GL/glu.h:265: syntax error before `void' /usr/include/GL/glu.h:265: warning: data definition has no type or storage class /usr/include/GL/glu.h:266: syntax error before `void' /usr/include/GL/glu.h:266: warning: data definition has no type or storage class /usr/include/GL/glu.h:267: syntax error before `GLint' /usr/include/GL/glu.h:267: warning: data definition has no type or storage class /usr/include/GL/glu.h:268: syntax error before `GLint' /usr/include/GL/glu.h:268: warning: data definition has no type or storage class /usr/include/GL/glu.h:269: syntax error before `GLint' /usr/include/GL/glu.h:269: warning: data definition has no type or storage class /usr/include/GL/glu.h:270: syntax error before `GLint' /usr/include/GL/glu.h:270: warning: data definition has no type or storage class /usr/include/GL/glu.h:271: syntax error before `GLint' /usr/include/GL/glu.h:271: warning: data definition has no type or storage class /usr/include/GL/glu.h:272: syntax error before `GLint' /usr/include/GL/glu.h:272: warning: data definition has no type or storage class /usr/include/GL/glu.h:273: syntax error before `GLboolean' /usr/include/GL/glu.h:273: warning: data definition has no type or storage class /usr/include/GL/glu.h:274: syntax error before `void' /usr/include/GL/glu.h:274: warning: data definition has no type or storage class /usr/include/GL/glu.h:275: syntax error before `void' /usr/include/GL/glu.h:275: warning: data definition has no type or storage class /usr/include/GL/glu.h:276: syntax error before `void' /usr/include/GL/glu.h:276: warning: data definition has no type or storage class /usr/include/GL/glu.h:277: syntax error before `void' /usr/include/GL/glu.h:277: warning: data definition has no type or storage class /usr/include/GL/glu.h:278: syntax error before `void' /usr/include/GL/glu.h:278: warning: data definition has no type or storage class /usr/include/GL/glu.h:279: syntax error before `void' /usr/include/GL/glu.h:279: warning: data definition has no type or storage class /usr/include/GL/glu.h:280: syntax error before `void' /usr/include/GL/glu.h:280: warning: data definition has no type or storage class /usr/include/GL/glu.h:281: syntax error before `void' /usr/include/GL/glu.h:281: warning: data definition has no type or storage class /usr/include/GL/glu.h:282: syntax error before `void' /usr/include/GL/glu.h:282: warning: data definition has no type or storage class /usr/include/GL/glu.h:283: syntax error before `const' /usr/include/GL/glu.h:283: parse error before `gluErrorString' /usr/include/GL/glu.h:283: warning: data definition has no type or storage class /usr/include/GL/glu.h:284: syntax error before `void' /usr/include/GL/glu.h:284: warning: data definition has no type or storage class /usr/include/GL/glu.h:285: syntax error before `const' /usr/include/GL/glu.h:285: parse error before `gluGetString' /usr/include/GL/glu.h:285: warning: data definition has no type or storage class /usr/include/GL/glu.h:286: syntax error before `void' /usr/include/GL/glu.h:286: warning: data definition has no type or storage class /usr/include/GL/glu.h:287: syntax error before `void' /usr/include/GL/glu.h:287: warning: data definition has no type or storage class /usr/include/GL/glu.h:288: syntax error before `void' /usr/include/GL/glu.h:288: warning: data definition has no type or storage class /usr/include/GL/glu.h:289: syntax error before `GLUnurbs' /usr/include/GL/glu.h:289: parse error before `gluNewNurbsRenderer' /usr/include/GL/glu.h:289: warning: data definition has no type or storage class /usr/include/GL/glu.h:290: syntax error before `GLUquadric' /usr/include/GL/glu.h:290: parse error before `gluNewQuadric' /usr/include/GL/glu.h:290: warning: data definition has no type or storage class /usr/include/GL/glu.h:291: syntax error before `GLUtesselator' /usr/include/GL/glu.h:291: parse error before `gluNewTess' /usr/include/GL/glu.h:291: warning: data definition has no type or storage class /usr/include/GL/glu.h:292: syntax error before `void' /usr/include/GL/glu.h:292: warning: data definition has no type or storage class /usr/include/GL/glu.h:293: syntax error before `void' /usr/include/GL/glu.h:293: parse error before `_GLUfuncptr' /usr/include/GL/glu.h:293: warning: data definition has no type or storage class /usr/include/GL/glu.h:294: syntax error before `void' /usr/include/GL/glu.h:294: warning: data definition has no type or storage class /usr/include/GL/glu.h:295: syntax error before `void' /usr/include/GL/glu.h:295: warning: data definition has no type or storage class /usr/include/GL/glu.h:296: syntax error before `void' /usr/include/GL/glu.h:296: warning: data definition has no type or storage class /usr/include/GL/glu.h:297: syntax error before `void' /usr/include/GL/glu.h:297: warning: data definition has no type or storage class /usr/include/GL/glu.h:298: syntax error before `void' /usr/include/GL/glu.h:298: warning: data definition has no type or storage class /usr/include/GL/glu.h:299: syntax error before `void' /usr/include/GL/glu.h:299: warning: data definition has no type or storage class /usr/include/GL/glu.h:300: syntax error before `void' /usr/include/GL/glu.h:300: warning: data definition has no type or storage class /usr/include/GL/glu.h:301: syntax error before `void' /usr/include/GL/glu.h:301: warning: data definition has no type or storage class /usr/include/GL/glu.h:302: syntax error before `void' /usr/include/GL/glu.h:302: warning: data definition has no type or storage class /usr/include/GL/glu.h:303: syntax error before `GLint' /usr/include/GL/glu.h:303: warning: data definition has no type or storage class /usr/include/GL/glu.h:304: syntax error before `void' /usr/include/GL/glu.h:304: warning: data definition has no type or storage class /usr/include/GL/glu.h:305: syntax error before `void' /usr/include/GL/glu.h:305: parse error before `_GLUfuncptr' /usr/include/GL/glu.h:305: warning: data definition has no type or storage class /usr/include/GL/glu.h:306: syntax error before `void' /usr/include/GL/glu.h:306: warning: data definition has no type or storage class /usr/include/GL/glu.h:307: syntax error before `void' /usr/include/GL/glu.h:307: warning: data definition has no type or storage class /usr/include/GL/glu.h:308: syntax error before `void' /usr/include/GL/glu.h:308: warning: data definition has no type or storage class /usr/include/GL/glu.h:309: syntax error before `void' /usr/include/GL/glu.h:309: warning: data definition has no type or storage class /usr/include/GL/glu.h:310: syntax error before `GLint' /usr/include/GL/glu.h:310: warning: data definition has no type or storage class /usr/include/GL/glu.h:311: syntax error before `void' /usr/include/GL/glu.h:311: warning: data definition has no type or storage class /usr/include/GL/glu.h:312: syntax error before `void' /usr/include/GL/glu.h:312: warning: data definition has no type or storage class /usr/include/GL/glu.h:313: syntax error before `void' /usr/include/GL/glu.h:313: warning: data definition has no type or storage class /usr/include/GL/glu.h:314: syntax error before `void' /usr/include/GL/glu.h:314: parse error before `_GLUfuncptr' /usr/include/GL/glu.h:314: warning: data definition has no type or storage class /usr/include/GL/glu.h:315: syntax error before `void' /usr/include/GL/glu.h:315: warning: data definition has no type or storage class /usr/include/GL/glu.h:316: syntax error before `void' /usr/include/GL/glu.h:316: warning: data definition has no type or storage class /usr/include/GL/glu.h:317: syntax error before `void' /usr/include/GL/glu.h:317: warning: data definition has no type or storage class /usr/include/GL/glu.h:318: syntax error before `void' /usr/include/GL/glu.h:318: warning: data definition has no type or storage class /usr/include/GL/glu.h:319: syntax error before `void' /usr/include/GL/glu.h:319: warning: data definition has no type or storage class /usr/include/GL/glu.h:320: syntax error before `GLint' /usr/include/GL/glu.h:320: warning: data definition has no type or storage class /usr/include/GL/glu.h:321: syntax error before `GLint' /usr/include/GL/glu.h:321: warning: data definition has no type or storage class /home/stewart/test/kock.c:201: parse error before `--' stewart@linux:~>