LinkedInTwitterFacebook

Working with GLFW library under Fedora.

Today I will try to use GLFW library.

GLFW is a C library that lets you using an OpenGL context and window, display modes and inputs like keyboard, mouse, joystick and time.

GLFW supports Windows, Mac OS X and Unix, Linux and FreeBSD and any operating systems with the X Window System.

Also you can read more about this library here.

First install the library using root account.

Now let’s see the source code.

First I includes all librarys I need.

In the main function I start to see if the library is working.

The next step is to set some settings, see:

… and also testing the desktop settings.

The settings it’s show on console with cout function.

Now I make the window context using fullscreen option.

I set the title of the window.

I enable the keys.

The next source code it’s close the window.

Testing with time command to see how fast working.

The netbeans IDE make the package in this path.

I make RPM package for Fedora distro.

I test my example and working well.

Share