C++ Programming & Tutorials for Beginners

How to Install OpenGL in Dev C++ | its libraries and Using graphics.h with Dev C++ | Graphics | C++ Programming

OpenGL is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit, to achieve hardware-accelerated rendering.


Final Output of OpenGL in Dev C++

=> First of all we will install Dev C++ on our computer.

1) Dev-C++:

https://drive.google.com/file/d/1rfTIzwGnXGIVpp5_JuzRc6aFgARgzrJh/view

https://sourceforge.net/projects/orwelldevcpp/



---------------------------------------------------------------------------

Start libraries files Setting 

---------------------------------------------------------------------------

=> After Installation, now we will give path of libraries files...

   Download freeglut 3.0.0 MinGW and follow below steps:

2) Free Glut:

https://www.transmissionzero.co.uk/software/freeglut-devel/

https://drive.google.com/drive/u/1/folders/1nudMAMOR057ZwVX_RPYXsx8AJldokuK8


=> Copy below path files

1) freeglut -> include -> GL -> copy all(4) files namely: freeglut.h, freeglut_ext.h, freeglut_std.h, glut.h


=> Paste copied files to below path:

2) C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include\GL\



=> Copy below path files:

1) freeglut -> lib -> copy all(2) files namely: libfreeglut.a, libfreeglut_static.a


=> Paste copied files to below path:

2) C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib\

 


=> Copy below path files:

1) freeglut -> bin -> x64 -> copy file namely: freeglut.dll


=> Paste copied files to below path:

2) C:\Windows\System32\



****** Now we will give path to graphics.h and libbgi.a files.. **************

3) Link for graphics.h, libbgi.a, txt file :

https://drive.google.com/drive/u/1/folders/1nudMAMOR057ZwVX_RPYXsx8AJldokuK8


=> Open related Folder and copy graphics.h header file and paste to given below path:

1) C:\Program Files (x86)\Dev-Cpp\MinGW64\include

                


=> Copy libbgi.a file and paste to given below path:

1) C:\Program Files (x86)\Dev-Cpp\MinGW64\lib



---------------------------------------------------------------------------

Closed libraries files Setting 

---------------------------------------------------------------------------

Now we will create a Project under Dev C++

1) we will add parameters by right clicking on the right side of Project name -> Project Options



then paste below files into the Linker Frame:

Linker for Project:

-lopengl32

-lfreeglut

-lglu32




2) Now select TDM-GCC 4.9.2 32-bit Release from Selection...



Note: File name will be same as your Project name 


OpeningWindow.Cpp



Output :


ReshapingWindows.cpp



Output :


RotationTranslation.cpp



Output :


ThreeDShape.cpp


Output :

















Next
This is the current newest page
Previous
Next Post »