Here are the source code of the program I'm trying to run:
http://www.evl.uic.edu/aej/594/code/Makefile.linux
http://www.evl.uic.edu/aej/594/geometry_shader/ogl.cpp
http://www.evl.uic.edu/aej/594/geometry ... /toon.vert
http://www.evl.uic.edu/aej/594/geometry ... /toon.geom
http://www.evl.uic.edu/aej/594/geometry ... /toon.frag
It compiles fine once you install the necessary libraries. However when you try to run the program, it segfaults when trying to setup the shader. Here is the gdb output:
Code: Select all
user@user-vb:~/glsl$ gdb ./ogl
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/user/glsl/ogl...done.
(gdb) run
Starting program: /home/user/glsl/ogl
[Thread debugging using libthread_db enabled]
[New Thread 0xb78cbb70 (LWP 2971)]
[New Thread 0xb78aab70 (LWP 2972)]
[Thread 0xb78aab70 (LWP 2972) exited]
[Thread 0xb78cbb70 (LWP 2971) exited]
[New Thread 0xb7889b70 (LWP 2973)]
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x8188e50
OpenGL Warning: Retry with 0xd4 returned 1 visuals
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x8188e50
OpenGL Warning: Retry with 0xd4 returned 1 visuals
Ready for GLSL
(?
(?
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x0804969e in setShaders (vert=0x8049a62 "./toon.vert", frag=0x8049a56 "./toon.frag", geom=0x8049a4a "./toon.geom") at ogl.cpp:186
#2 0x0804991f in main (argc=1, argv=0xbffff544) at ogl.cpp:251
(gdb) q
A debugging session is active.
Inferior 1 [process 2966] will be killed.
Quit anyway? (y or n) y
user@user-vb:~/glsl$
Code: Select all
glProgramParameteriEXT(pro,GL_GEOMETRY_INPUT_TYPE_EXT,GL_LINES);