I made a game with OpenGL 4.3(core profile) and C++. I used GLFW3 for window and context management. I am also using bunch of third party library which are also available for linux.

What things do i need to consider if i want to port the game and how can i make it support all windows and linux?

  • \$\begingroup\$ Have you ever use linux? What are you using for project management? (CMake, Visual Studio, Code::Blocks, etc.) \$\endgroup\$
    – Lasoloz
    Commented Feb 1, 2017 at 8:29
  • \$\begingroup\$ i know how to compile c++ files and also used makefiles in Ubuntu. And i use visual studio 2015. thanks. \$\endgroup\$ Commented Feb 1, 2017 at 8:32
  • \$\begingroup\$ What are you using for sound, input, networking, memory, and other platform-specific subsystems? Despite what some people claim, OpenGL on it's own isn't enough for a port. \$\endgroup\$ Commented Feb 1, 2017 at 8:40
  • \$\begingroup\$ Some libraries are platform specific but most of them are available for linux. I am using windows 10 64 bit and i want to port the game to ubuntu 64 bit. I don't know what is the process. \$\endgroup\$ Commented Feb 1, 2017 at 8:47
  • 1
    \$\begingroup\$ @Ankitsinghkushwah When you download the development libraries from the repo, you don't have to compile them, they come precompiled. \$\endgroup\$
    – Lasoloz
    Commented Feb 1, 2017 at 9:05

1 Answer 1


What I would do first, is collect the list of libararies you link against for the windows opengl game. I personally stick to 64 bit when given the option since I have 64bit pc.use 32 bit if thats what your computer and operating system support( u can install 32 bit on 64 bit since it is reverse compaitble. just cant install 64 bit onto 32 bit archatecture.)

Opengl is already available for linux via the Mesa libs. if all libararies are already available for linux. download and install them, there is also probably a "-dev" version of the libraries you want those aswell. make sure u get both versions. "-dev" contains the source code and or the header files and the debug symbols.

second create a Make or Cmake files to make life easier so you dont have to pass all that to the command line( I prefer cmake, it usually makes better make files than I can). configure the make or cmake file so that you link all of the libraries into your project and then compile your code.

Your code might generate errors and warning that it never gave in windows possibly so you will need to resolve any unforseen issues.

not all versions of linux are the same either. some libararies might not be supported in some versions or even just wont work with all hardware, but recently this has not been such a problem. keep this in mind if u have an issue

Cmake's website can help you get set up. Cmake helps you generate Makefiles and generate Visual Studio solutions.

https://cmake.org/cmake-tutorial/ great point for getting started.

and the last part is if you find anything that was windows only specefic, that will have removed and/or rewritten. first thing to do if this happens is google for a linux library that provides the same functionality.

now for my personal recommendation, I like to use SDL2 and its related libraries. It is multi-platform, mean if you target SDL2 instead of "linux" or "windows" that it will run on anything. it can create a window. it can create and use different renders. such as opengl, or DirectX . and u can just use it. it even has its own renderer's.

If your interested in more about SDL2 :

https://www.libsdl.org/ direct website for download and wiki.

and some videos as well

https://www.youtube.com/watch?v=MeMPCSqQ-34 steamdev days talk about sdl2 and linux game dev

https://www.youtube.com/watch?v=Sd8ie5R4CVE another one

https://www.youtube.com/watch?v=xTmAknUbpB0&t=1433s this one is about debugging on linux.

  • \$\begingroup\$ and as soon as i post i see it was sort of answer via comments. well hope this helped still. \$\endgroup\$
    – Randy
    Commented Mar 28, 2017 at 17:19

Not the answer you're looking for? Browse other questions tagged .