Hot answers tagged

86

I'd guess you don't have whatever dev package(s) provide gl.h. apt-file is the command line tool to use. First, make sure it's up to date: apt-file update Now you can write a search to answer "what package provides the gl.h file?" apt-file search "gl.h" I don't have an ubuntu box just now to check, but I'd guess the result will be something like mesa-...


53

Ubuntu since 11.04 comes with benchmarks glmark2 and glmark2-es2 which are quite good to perform simple benchmark (with shader) and are very light for download. glmark2 is actively developed by Linaro group. With each new release, new and more demanding benchmarks are coming. https://launchpad.net/glmark2 Benchmark also runs well on devices (ARM, OpenGL-...


42

Your instructions seem to be old, as far as I know glut is provided by the package freeglut3, to get it with the header files for development, install: sudo apt-get install freeglut3-dev freeglut3-dev which should also pull in freeglut3. To have found this on your own, you could have done: sudo apt-cache search glut After you have installed package ...


39

For GL/gl.h use: sudo apt install mesa-common-dev You may also find these helpful, for, say, GL/glu.h: sudo apt install libglu1-mesa-dev freeglut3-dev


39

I was having the same issue but with a different graphics card and a different OS (Fedora 22 KDE spin). I just came across this: https://ask.fedoraproject.org/en/question/69542/fedora-22-full-screen-tearingflickering-under-kde/ which has several options that seem to solve the problem under Fedora at least. I'm trying option 3 and it seems to be working so ...


30

You need to remove the nvidia drivers so that the driver does not try to get itself loaded instead of your Intel card. Normally no further installation of drivers is required for the Intel built in driver but if the nVidia driver is getting loaded it will take over. sudo apt-get purge nvidia* Remove your xorg.conf sudo rm /etc/X11/xorg.conf Reinstall ...


30

The swrast thing is the software renderer. That means it's not finding the hardware driver for your graphics card. There are a bunch of libGL libraries installed and a bunch of of symbolic links to those libraries. To see these run this from the shell: find /usr -iname "*libGL.so*" -exec ls -l -- {} + Now the probable cause of your problem is that ...


28

Add the following to the .vmx file of the VM mks.gl.allowBlacklistedDrivers = "TRUE" Next, install the Mesa-libtxc_dxtn1 (aka the S3 texture compression), this will probably called something be different since you are on Ubuntu and I'm using OpenSUSE 12.2. Chances are this will crash your VM like it does to mine and only a reboot will fix it. Trying ...


18

Regarding to for Qt doc: The Qt installers for Linux assume that a C++ compiler, debugger, make, and other development tools are provided by the host operating system. In addition, building graphical Qt applications requires OpenGL libraries and headers installed. Most Linux distributions do not install all of these by default, but setting up a development ...


15

Note: I've added this answer at a later date, because none of the existing answers address a crucial aspects regarding ssh, and will give misleading values to those who follow the above instructions. Use X-forwarding when ssh-ing. This is enabled with ssh -X. Without x-forwarding: $ ssh MYCOMP $ glxinfo Error: unable to open display With x-forwarding: $ ...


15

Ah, as @steeldriver points out, headers and libraries are different things, and doing the following fixed the issue: sudo apt-get install mesa-common-dev This installs the required headers.


14

Probably you have already installed the libraries, I show the steps but again for the reason of completeness. SDL2 sudo apt-get install libsdl2-dev SDL1 sudo apt-get install libsdl1.2-dev Start the compilation with: SDL2 gcc cube.c `pkg-config --cflags --libs sdl2` SDL1 gcc cube.c `pkg-config --cflags --libs sdl` Sample output: % pkg-config --...


13

sudo apt-get install libtxc-dxtn-s2tc0 Fixed my openGL error for DOTA on ubuntu 17.4 Intel CPU


11

glxgears stuck to 60fps may be due to VSync signal synchronization. Hope other benchmark application won't have same results, but depending on your graphic card you may bypass this. (but with risk to observe tearing on screen) If you want to go on, I would suggest have a look to this discussion. To disable Vsync, run glxgears like this: vblank_mode=0 ...


10

I found the answer from this thread (https://askubuntu.com/a/717860/25131) Alt + F10 and then open terminal from the menu that appears then type ccsm in to the terminal. in there search for unity plugin and enable it. It asks several questions because enabling it conflicts with another. After enabling it the Unity launcher and menu bar should appear.


10

The OpenGL drivers in the VirtualBox Guest Additions are limited to OpenGL 2.1. Despite many requests for improved OpenGL capability in the VBox user forums I've seen no mention of the VBox developers working on OpenGL 3 or better support. That said it only had OpenGL 2.0 support around 2009 and has been quietly upgrading to OpenGL 2.1 in the meantime. They ...


10

Solved, I have setup what I want. I posted the answer shown below at GitHub. Remove all Nvidia packages and reinstall xorg packages. sudo apt-get purge nvidia* sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core sudo dpkg-reconfigure xserver-xorg Install cuda8. You need to: Press ...


9

To install OpenGL libraries: sudo apt-get install mesa-utils To install freeGlut: sudo apt-get install freeglut3-dev


9

GLC is well-suited for this purpose. Unfortunately it is not packaged in the archives. However, I have put it (and its dependencies) in a PPA: ppa:george-edison55/glc (Click here for instructions on using PPAs.) You can add the PPA to your system using the following commands: sudo apt-add-repository ppa:george-edison55/glc sudo apt-get update Then you ...


9

GLFW, Mesa, Ubuntu 16.04 AMD64 I haven't tried it inside of Virtual Box, but this should work regardless since Mesa has a software implementation. sudo apt-get install libglfw3-dev libgles2-mesa-dev gcc glfw_triangle.c -lGLESv2 -lglfw Output: Source: #include <stdio.h> #include <stdlib.h> #define GLFW_INCLUDE_ES2 #include <GLFW/glfw3.h&...


9

Be careful when using Charles Green's advice. On the sudo apt-get upgrade step, you might see: sudo add-apt-repository ppa:oibaf/graphics-drivers sudo apt-get update sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically ...


8

Try LIBGL_ALWAYS_SOFTWARE=1 ./yourprogram


8

OpenGL support is typically a hardware feature, and cannot just be upgraded by installing a new/different driver; the nvidia drivers you mention are for discrete Nvidia cards and will do nothing for your Intel graphics. According to Intel's documentation, the 965GM chipset supports only up to OpenGL 1.5. For OpenGL 4.0+ support, it appears you will need to ...


8

Just for completeness, this problem also occurs when you mistakenly installed the "nvidia-319-updates" package, but you do not have an nVidia graphics chip on your system. In my case this package was an indirect dependency from package "libopencv-dev". So, when you're running on an ATI or Intel grpahics chip for example, and you installed openCV (package ...


8

I had a similar issue when running some GL applications via 'ssh -X' and solved it by adding "+iglx" to xserver-command in /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf. [SeatDefaults] # Dump core xserver-command=X -core +iglx After which you either reboot or Ctrl-Alt-F1, login, and 'sudo service lightdm restart'. I hope this helps!


7

I'm using SimpleScreenRecorder to record my Minecraft gameplay. It required a few tweaks to get the sound working but nearly everything you need for recording Minecraft should be in the site (under "Recording game audio"). It has a GUI and, despite the name, has quite a lot of settings that you can tweak to get a video to suit your needs (e.g. quality vs ...


7

I've successfully solved the problem. Well, what I did was this: sudo apt-get install ppa-purge sudo ppa-purge ppa:unity-team/staging sudo apt-get update sudo apt-get install --reinstall ubuntu-desktop sudo apt-get install unity That, followed by a reboot, is the recipe for a fix! :D


7

To solve my problem I had to enter the following commands: sudo apt-get remove --purge xserver-xorg sudo apt-get install xserver-xorg sudo dpkg-reconfigure xserver-xorg And then: sudo reboot But I think that if you on pure text mode, you don't need to reboot your computer, but you would have to do sudo /etc/init.d/gdm stop before you type the commands ...


6

Under Ubuntu 12.10, Unity 2D has been replaced by Unity 3D running on a software 3D backend. This, as you have discovered, is significanty slower the Unity 2D on the same hardware, because 2D graphics software has had 30 years worth of clever optimizations which don't work when you try to do 2D graphics on a 3D stack. The Unity 2D software has been ...


Only top voted, non community-wiki answers of a minimum length are eligible