Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 1 of 1

Thread: GLUT+GLEW=OK, GLFW+GL3W=OK, but GLFW+GLEW=crash in ubuntu

  1. #1
    Intern Newbie
    Join Date
    May 2014

    GLUT+GLEW=OK, GLFW+GL3W=OK, but GLFW+GLEW=crash in ubuntu

    The code in red book for OpenGL 4.3 is GLUT(freeglut actually)+GLEW, which runs ok.

    The code in red book for OpenGL 4.5 is GLFW+GL3W, which runs ok too.

    Then I am thinking of GLFW+GLEW, but it crashes on ubuntu. The source code is the Sierpinski Gasket from a computer graphics textbook (it's highly likely familiar to you already). The zip package of the sources is in the attachment. I build it in NetBeans 8.2 on ubuntu 16.04 in which OpenGL 4.5 is installed. The linking option is -lglfw -lGLEW -lGL -ldl. The original GLUT statements (which works with GLEW) are commented out and GLFW codes are added in. The crash happens at line 35 of the main source example1.cpp:

    Code :
    glGenVertexArrays( 1, &vao );

    with the segment fault:
    Click image for larger version. 

Name:	Untitled.png 
Views:	12 
Size:	17.7 KB 
ID:	2788

    I don't know where I made a mistake or missed something after checking many times, so I submit the problem here in hope that someone could help. If you need any information towards troubleshooting, please let me know. Thank you!

    PS: GLFW+GLEW works on Windows 10 + Visual Studio 2015
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts