Open gl configuration_march2014
-
Upload
vijay-verma -
Category
Technology
-
view
244 -
download
5
description
Transcript of Open gl configuration_march2014
![Page 1: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/1.jpg)
Installing and Configuring on
WindowsVijay Kumar Verma (VJY)
Roll No- 1326910
On: 5 March-2014
![Page 2: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/2.jpg)
04/07/2023 By: VJY 2
Objective Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
![Page 3: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/3.jpg)
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
![Page 4: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/4.jpg)
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
![Page 5: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/5.jpg)
04/07/2023 By: VJY 5
What is Open GL?Cont…
Open GL
GLUT
GLEW
GL
![Page 6: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/6.jpg)
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)
![Page 7: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/7.jpg)
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()
![Page 8: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/8.jpg)
04/07/2023 By: VJY 8
Rendered Example
![Page 9: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/9.jpg)
04/07/2023 By: VJY 9
For More Info| http://www.glprogramming.com/red/
| http://en.wikipedia.org/wiki/OpenGL/
| http://opengl.org/
![Page 10: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/10.jpg)
04/07/2023 By: VJY 10
Now Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
![Page 11: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/11.jpg)
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
![Page 12: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/12.jpg)
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
![Page 13: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/13.jpg)
04/07/2023 By: VJY 13
Installation| Install Dev C++
| Install Visual Studio
![Page 14: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/14.jpg)
04/07/2023 By: VJY 14
Now Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
![Page 15: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/15.jpg)
04/07/2023 By: VJY 15
Configure Open GL| Extract the files:
![Page 16: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/16.jpg)
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++
![Page 17: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/17.jpg)
04/07/2023 By: VJY 17
Now Understand Open GL Installation of Open GL Configure On Windows Write Simple Program
![Page 18: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/18.jpg)
04/07/2023 By: VJY 18
Simple Program| Download simple program from: Facebook.com/groups/sviet.mca
![Page 19: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/19.jpg)
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
![Page 20: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/20.jpg)
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.
![Page 21: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/21.jpg)
04/07/2023 By: VJY 21
Compile and Run on MSVC
Cont.
![Page 22: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/22.jpg)
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.
![Page 23: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/23.jpg)
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.
![Page 24: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/24.jpg)
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
![Page 25: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/25.jpg)
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.
![Page 26: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/26.jpg)
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();
![Page 27: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/27.jpg)
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();
![Page 29: Open gl configuration_march2014](https://reader034.fdocuments.in/reader034/viewer/2022051411/53ffbdaf8d7f724c088b4818/html5/thumbnails/29.jpg)
Thank You!Vijay Kumar Verma{ SVIET MCA }