Date post: | 29-Aug-2014 |
Category: |
Technology |
Upload: | vijay-verma |
View: | 244 times |
Download: | 5 times |
Installing and Configuring on
WindowsVijay Kumar Verma (VJY)
Roll No- 1326910
On: 5 March-2014
04/07/2023 By: VJY 2
Objective Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
04/07/2023 By: VJY 3
What is Open GL?| Application Program interface.| Multi-Platform or Cross-Platform API.| Interact with GPU for accelerate Hardware.| Easy to Use.| Developed by Silicon Graphics in 1991.| Managed by Khronos Group.| Latest OpenGL 4.4 released in 22 July 2013
04/07/2023 By: VJY 4
What is Open GL?| Performance by GPU| Control GPU using Graphics shaders| GPU all rendering
Cont…
Vertex Processor
Clipper and primitive assembler Rasterizer Fragment
processorVertices Pixels
04/07/2023 By: VJY 5
What is Open GL?Cont…
Open GL
GLUT
GLEW
GL
04/07/2023 By: VJY 6
What is GLUT| Provides functionality common to all window
systems| Open a window| Get input from mouse and keyboard| Menus| Event-driven
| GLUT-based user interface library| freeglut updates GLUT (written by Pawel W.
Olszta)
04/07/2023 By: VJY 7
What is GLEW| OpenGL Extension Wrangler Library
| Makes it easy to access OpenGL extensions available on a particular system
| Provide efficient run-time machinism| Application needs only to include glew.h and run a glewInit()
04/07/2023 By: VJY 8
Rendered Example
04/07/2023 By: VJY 9
For More Info| http://www.glprogramming.com/red/
| http://en.wikipedia.org/wiki/OpenGL/
| http://opengl.org/
04/07/2023 By: VJY 10
Now Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
04/07/2023 By: VJY 11
Downloading| Downloading required Software
• Dev C++
• Microsoft Visual Studio 2010 Express Edition
| Download Required Library
• Download OpenGL Library
• Download Supported Libraries
04/07/2023 By: VJY 12
Links| Download Dev C++ http://goo.gl/DsLA
| Download MSVS 2010 http://goo.gl/liHnq
| Download Open GL for VS http://goo.gl/qckMm1
| Download Open GL for Dev C++ http://goo.gl/tgjHnu
| Download Glew for VS http://goo.gl/WuqD95
04/07/2023 By: VJY 13
Installation| Install Dev C++
| Install Visual Studio
04/07/2023 By: VJY 14
Now Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
04/07/2023 By: VJY 15
Configure Open GL| Extract the files:
04/07/2023 By: VJY 16
Configure Open GL| Open Microsoft SDKs folder path:
C:\Program Files\Microsoft SDKs\Windows\v7.0A
| Now copy the content of the files from the freeglut and glew here in include and lib directory. Such as:Open lib folder of freeglut and copy freeglut.lib and paste it inside the Lib of v7.0AOpen include folder of freeglut and copy header files form gl folder to Gl folder of of v7.0ADo same thing for the glew and for DevC++
04/07/2023 By: VJY 17
Now Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
04/07/2023 By: VJY 18
Simple Program| Download simple program from: Facebook.com/groups/sviet.mca
04/07/2023 By: VJY 19
Compile and Run on MSVC
| Create a new project with a NameFile -> New -> Project
Select “Empty Project” and give a name| Now Add an item using
Right Click on project in solution explorer-> Add -> New item –> Select C++ file -> Type name main.c -> Click on
add button| Type or paste the source code you
downloaded
04/07/2023 By: VJY 20
Compile and Run on MSVC
| Set Property of projectRight Click -> Properties -> select All Configurations option from drop down and do following setting
C/C++ -> Preprocessor Preprocessor Definition:
_CRT_SECURE_NO_WARNINGSWIN32_DEBUG_CONSOLE
Cont.
04/07/2023 By: VJY 21
Compile and Run on MSVC
Cont.
04/07/2023 By: VJY 22
Compile and Run on MSVC
C/C++ -> General Warning Level : Level 4Treat Warning as Errors
Yes(/wx)C/C++ -> Advanced
Compile As: Compile as C CodeLinker -> INput
Additional ..: Edit and add glew32.libfreeglut.lib
Cont.
04/07/2023 By: VJY 23
Compile and Run on MSVC
| Build ProjectBuild Menu -> Build ProjectName
| Add dll fileOpen freeglut folder again copy freeglut.dll file from bin folder and paste in project debug folderEx: C:\Users\VJY\Documents\Visual Studio 2010\Projects\3March1\Debug
| DebugDebug -> Start Debugging (F5)
Successful!
Cont.
04/07/2023 By: VJY 24
Compile and Run on DEVC++
| Create a new project with a NameFile -> New -> Project
Select “Console Application” and save with a name
| Configure the projectProject -> Project Options ->
Parameter tabs and add following to linkers-lglut32 -lglu32 -lopengl32 -lwinmm
-lgdi32
04/07/2023 By: VJY 25
Compile and Run on DEVC++
| Type Source Code or paste it that is downloaded sample.c
| Complied itExecute -> Compile -> Done
| Run itExecute -> Run
Successful !
Cont.
04/07/2023 By: VJY 26
Summary of ProgramglutInit(&argc,argv); glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(500,500);glutInitWindowPosition(0,0); glutCreateWindow("simple"); glutDisplayFunc(display);init();glutMainLoop();
04/07/2023 By: VJY 27
Summary of ProgramglBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);glVertex2f(-0.5, 0.5);glVertex2f(0.5, 0.5);glVertex2f(0.5, -0.5);
glEnd();
Thank You!Vijay Kumar Verma{ SVIET MCA }