Professional Documents
Culture Documents
OpenGL Installation
OpenGL Installation
OpenGL is an application programming interface also we call it API which is merely software
library for accessing features in graphic hardware and also OpenGL is designed as streamlined,
hardware independent interface that can be implemented on many different types of graphic
hardware systems.
OpenGL, as compared to other similar graphics libraries, is fairly simple. We'll start with setting
it up on our system, by following below procedure to add it library in our system.
Note: Must download amd64 ones, after all, you're running 64-bit windows and also
if you're running 32-bit windows follow the same procedure except you have to
download win32 of PyOpenGL and PyOpenGL_accelerate from the same link. And
then follow the same steps.
4. Now go to the folder where you downloaded the files and run power shell/command
prompt(cmd) with administrator there.
5. Use pip to force install those files. For example:
pip install PyOpenGL-3.1.6-cp311-cp311-win_amd64.whl --force-reinstall
pip install PyOpenGL_accelerate-3.1.6-cp311-cp311-win_amd64.whl --force-
reinstall
Note: Install PyOpenGL first and then PyOpenGL_accelerate
6. If the installation succeeds, you may be able now to run.
It is necessary to restart your desktop if you reinstall any one of them (Python,
OpenGL)
Example:
Let start the first program: to start our task firstly we have to import the following libraries
from OpenGL.GLUT import *
from OpenGL.GL import *
from OpenGL.GLU import *
Now, if we wish to draw any shapes or make any other kind of graphics, we need to do
that in our "showScreen" function/method.