Using GLEW | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Using GLEW

I tried this simple code to test if I was right: #define GLEW_STATIC #include <GL/glew.h> int main() { glewInit(); glewExperimental = true; glCreateProgram(); } glCreateProgram() generates the Segfault issue and it happens also with other OpenGL functions (Compiled on Ubuntu with: "g++ -std=c++17 -oglut_test glut_test.cpp -lpthread -lglut -lGL -lGLEW") Can someone explain me why this happens?

30th Dec 2019, 1:44 PM
OrHy3
OrHy3 - avatar
1 Answer
+ 1
I guess you need to firstly create valid opengl rendering context to use opengl functions. (Just my overly simplistic guess, it could be anything). Create window and try to clear its content.
2nd Jan 2020, 10:02 PM
Null
Null - avatar