GLFW 3.2 not working with GLEW anymore

Hi all.

I’ve been using GLFW 3.1.1 + GLEW 1.12 without any problem on Ubuntu 14.04. Yesterday I decided to update to the newest versions of each library (GLFW 3.2 + GLEW 1.13).
Now I’m having problems with just a simple program that creates a window + load OpenGL extensions + displays the window with a background color.

With GLFW 3.1.1 + GLEW 1.12 or 1.13 the window background is cleared with the color I specified.
With GLFW 3.1 or 3.2 only (no OpenGL extensions loaded yet) it works as well.
With GLFW 3.2 + GLEW 1.12 or 1.13 the window background is NOT cleared (whatever was in the background appears inside the window, i.e. the IDE)

Source code: https://bpaste.net/show/1ef6644aeee7
Makefile: https://bpaste.net/show/4f2d692243d0

(I can’t put screenshots as I’m new user and I’m only allowed to put two).

Does anybody know what is happening?

Thanks!

Screenshot for GLFW 3.1.1 + GLEW 1.12: https://imagebin.ca/v/2kOlr2kGEVJe
Screenshot for GLFW 3.2 + GLEW 1.12: https://imagebin.ca/v/2kOm9mCEMqKs

I’m not sure what’s going on here - @elmindreda may know more.

I would have thought that on Linux for core OpenGL you don’t need GLEW. I know some users (myself included) have had issues with GLEW and many have switched to GLAD. As the examples and tests in GLFW use glad then it’s also more likely that any compatibility issues with these are found early.

Unable to reproduce with GLFW 3.2 and GLEW 1.13 on Ubuntu 16.04. Everything seems to work as expected.

@juacado What GPUs does the machine have and what drivers are installed for them?

@elmindreda Sorry for the late reply.

I’ve switched from GLEW to libepoxy. Some users in the irc channel were talking about libepoxy and GLAD, I switched to libepoxy because it was easier for me to install. The issue now happens sometimes, so I’ve switched back to GLFW 3.1.1 :sweat:

However in a MacBook Pro 15" I have no problem with GLFW 3.2.

The info you were asking for:

$ sudo lshw -c video
*-display
description: VGA compatible controller
product: Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 09
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:50 memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64)

$ modinfo i915
filename: /lib/modules/3.16.0-76-generic/kernel/drivers/gpu/drm/i915/i915.ko
license: GPL and additional rights
description: Intel Graphics
author: Tungsten Graphics, Inc.
srcversion: 6E3F50D84F8198521F7E5D8

Apologies for the late response, I didn’t spot there was a reply.

It might help to run the glfwinfo program for both GLFW 3.1.1 and GLFW 3.2 and copy the output for both here.

Also, any chance you could run cat /rpoc/cpuinfo and let us know the mode name to tie down which actual CPU you have (and so which GPU you have since you’re running on the Intel integrated GPU)?

I can’t see the source code in your pastebin, it’s gone, so perhaps you can paste that into the forum post?

Have you been able to debug and see if the program is running properly in the GLFW 3.2 case, i.e. does the call to swapbuffers occur?