SlideShare uma empresa Scribd logo
1 de 17
Graphics Libraries
Presented By:
Prachi Mishra
Contents
Overview
Common Graphics Libraries
PHIGS
Features of PHIGS
OpenGL
OpenGL Pipeline
Commands
Direct3D
How’s Direct3D Different?
Conclusion
References
03
04
05
06
07
08
09
14
15
16
17
Overview
• Today 3D graphics tools provide new methods in engineering,
medicine, entertainment and technology
• These are selected from exhaustive online research
• Incorrect selection can lead to undesired results
• A graphics library is a software interface to graphics hardware
commonly called the APIs
• It provides a set of graphics commands and functions which can
specify primitive geometric models and their attributes to digitize
and display
Common Graphics Libraries
A graphics programmer is should be able to program in at least one of
the following:
• OpenGL
• Direct3D
• PHIGS (Programmer's Hierarchical Interactive Graphics System)
• GKS (Graphics Kernel System)
PHIGS (Programmer's Hierarchical Interactive
Graphics System)
• An API standard for rendering 3D computer graphics through 1980s
• Available as a standalone implementation like IBM’s GraPHIGS or
Sun’s SunPHIGS
• Became a standard by 1990s ( ANSI and ISO)
• Supports only the most basic 3D graphics, including basic geometry
and meshes
• A combination of features of PHIGS and power led to the rise
of OpenGL
Features of PHIGS
• Included a scene graph which is a data structure for storing logical
sequences
• Had a CSS (Centralized Structure Store) i.e. a database for storing
primitives and their attributes
• CSSes were shared under workstations to give views
• Simple working:
Model built into CSS Workstation created and opened  Model
connected
OpenGL (Open Graphics Library)
• Most widely adopted graphics API
• Easy to use, well documented
• Cross platform and cross language
• Everything is primitive (can accept only simple shapes and sizes)
• Largely built on C but can be used in most programming languages
OpenGL Graphics Pipeline
void display(void)
{
int x, y;
//a. generate a random point
x = rand() %Width;
y = rand() % Height;
//b. specify a drawing color: red
glColor3f(1, 0, 0);
//c. specify to draw a point
glBegin(GL_POINTS);
glVertex2i (x,y);
glEnd();
//d. start drawing
glFlush();
}
Basic Commands for Drawing and Shape
void drawtriangle(float *v1, float *v2, float *v3)
{
glBegin(GL_TRIANGLES);
glVertex3fv(v1);
glVertex3fv(v2);
glVertex3fv(v3);
glEnd();
}
Commands for Transformation
glPushMatrix();
glLoadIdentity ();
glRotatef (alpha, 0.0, 0.0, 1.0);
drawArm (O, A);
glTranslatef (A[0], A[1], 0.0);
glRotatef (beta, 0.0, 0.0, 1.0);
glTranslatef (-A[0], -A[1], 0.0);
drawArm (A, B);
glPopMatrix();
Viewing
static void
reshape(int w, int h)
{
//a.specify modeling
coordinates
glMatrixMode
(GL_PROJECTION);
glLoadIdentity ();
glOrtho(left, right,
bottom, top, new,
far);
}
Color and Lighting
• Different colors for different vertices of the model can be
specified
• Light sources can be put to give different colors at different
positions in the environment, so the model can have overall
brightness, dull reflections, and/or shiny spots
• Lighting can be achieved by calculating the color of a pixel
• The normal of the pixel, the position of the viewer, and the
colors and positions of the light sources inherently decide
the lighting
Transparency
▪ Used for transparent objects by implementing transmission
coefficients for overlapping objects
▪ A final pixel’s R,G or B value depends on the blending of the
corresponding R, G, or B values of the pixels in the
overlapping objects through the transmission coefficients:
Iλ = a1Iλ1 + a2 Iλ2, where λ is R, G, or B; Iλ the blended color
component, a1 the transmission coefficient of the pixel in
the first object, and Iλ1 the color of the first object.
Direct3D
• Graphics API for Microsoft Windows
• Used to render 3D applications where performance is important
like gaming environments
• Implemented onWindows family of operating systems
• Also on embedded versions of Xbox family of video game
consoles
How’s Direct3D Different?
▪ Portability – OpenGL is cross platform while Direct3D is Windows
centric
▪ User Functionality – Direct3D is 3D hardware interface while
OpenGL is 3D rendering system that could be hardware accelerated
▪ Performance – Direct3D is more suitable when performance is
considered because of lighter codes
▪ Users/Applications – OpenGL has always seen more number of
users. Direct3D is mostly used for computer games
References
▪ http://www.opengl.org
▪ http://mohammadshakergtr.wordpress.com/
▪ http://graphics.wikia.com/wiki/Direct3D_vs._OpenGL
▪ http://slideshare.net/OpenGL_Basics
▪ https://ilias.fhv.at/goto_ilias_fhv_at_file_225344_download
.html

Mais conteúdo relacionado

Mais procurados

Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
Ponraj
 
Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web development
bethanygfair
 

Mais procurados (20)

What is OpenGL ?
What is OpenGL ?What is OpenGL ?
What is OpenGL ?
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Android Presentation [Final]
Android Presentation [Final]Android Presentation [Final]
Android Presentation [Final]
 
Android report
Android reportAndroid report
Android report
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 
Opengl basics
Opengl basicsOpengl basics
Opengl basics
 
Appium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | EdurekaAppium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | Edureka
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
 
Introduction to Android, Architecture & Components
Introduction to  Android, Architecture & ComponentsIntroduction to  Android, Architecture & Components
Introduction to Android, Architecture & Components
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting Started
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android Basic Concept
Android Basic Concept Android Basic Concept
Android Basic Concept
 
Android Internship report presentation
Android Internship report presentationAndroid Internship report presentation
Android Internship report presentation
 
Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web development
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
 

Destaque

Core Graphics & Core Animation
Core Graphics & Core AnimationCore Graphics & Core Animation
Core Graphics & Core Animation
Andreas Blick
 
If then vb2010
If then vb2010If then vb2010
If then vb2010
Spy Seat
 
Rocking slideshow
Rocking slideshowRocking slideshow
Rocking slideshow
nycdoe
 
Basketball
BasketballBasketball
Basketball
nycdoe
 
Jocelyn power point
Jocelyn power pointJocelyn power point
Jocelyn power point
nycdoe
 
الإنترنت في خدمة الباحثين
الإنترنت في خدمة الباحثينالإنترنت في خدمة الباحثين
الإنترنت في خدمة الباحثين
Mostafa Gawdat
 

Destaque (20)

Core Graphics & Core Animation
Core Graphics & Core AnimationCore Graphics & Core Animation
Core Graphics & Core Animation
 
Drawing with Quartz on iOS
Drawing with Quartz on iOSDrawing with Quartz on iOS
Drawing with Quartz on iOS
 
Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core Animation
 
Creating Container View Controllers
Creating Container View ControllersCreating Container View Controllers
Creating Container View Controllers
 
Core Animation
Core AnimationCore Animation
Core Animation
 
Building Modern Audio Apps with AVAudioEngine
Building Modern Audio Apps with AVAudioEngineBuilding Modern Audio Apps with AVAudioEngine
Building Modern Audio Apps with AVAudioEngine
 
Mastering Media with AV Foundation
Mastering Media with AV FoundationMastering Media with AV Foundation
Mastering Media with AV Foundation
 
If then vb2010
If then vb2010If then vb2010
If then vb2010
 
Rocking slideshow
Rocking slideshowRocking slideshow
Rocking slideshow
 
Basketball
BasketballBasketball
Basketball
 
Jocelyn power point
Jocelyn power pointJocelyn power point
Jocelyn power point
 
احترف صيانة الكمبيوتر
احترف صيانة الكمبيوتراحترف صيانة الكمبيوتر
احترف صيانة الكمبيوتر
 
الإنترنت في خدمة الباحثين
الإنترنت في خدمة الباحثينالإنترنت في خدمة الباحثين
الإنترنت في خدمة الباحثين
 
Master Video with AV Foundation
Master Video with AV FoundationMaster Video with AV Foundation
Master Video with AV Foundation
 
تصميم مواقع
تصميم مواقع تصميم مواقع
تصميم مواقع
 
Composing and Editing Media with AV Foundation
Composing and Editing Media with AV FoundationComposing and Editing Media with AV Foundation
Composing and Editing Media with AV Foundation
 
Animation in iOS
Animation in iOSAnimation in iOS
Animation in iOS
 
20 iOS developer interview questions
20 iOS developer interview questions20 iOS developer interview questions
20 iOS developer interview questions
 
iOS Developer Interview Questions
iOS Developer Interview QuestionsiOS Developer Interview Questions
iOS Developer Interview Questions
 
كتاب تعلم Html5 css3
كتاب تعلم Html5 css3كتاب تعلم Html5 css3
كتاب تعلم Html5 css3
 

Semelhante a Graphics Libraries

Ha4 displaying 3 d polygon animations
Ha4   displaying 3 d polygon animationsHa4   displaying 3 d polygon animations
Ha4 displaying 3 d polygon animations
JordanSmith96
 
Displaying 3 d polygon animations
Displaying 3 d polygon animationsDisplaying 3 d polygon animations
Displaying 3 d polygon animations
halo4robo
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_gl
changehee lee
 
13th kandroid OpenGL and EGL
13th kandroid OpenGL and EGL13th kandroid OpenGL and EGL
13th kandroid OpenGL and EGL
Jungsoo Nam
 
OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
Girish Ghate
 

Semelhante a Graphics Libraries (20)

openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).ppt
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.ppt
 
2D graphics
2D graphics2D graphics
2D graphics
 
Ha4 displaying 3 d polygon animations
Ha4   displaying 3 d polygon animationsHa4   displaying 3 d polygon animations
Ha4 displaying 3 d polygon animations
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shaders
 
Displaying 3 d polygon animations
Displaying 3 d polygon animationsDisplaying 3 d polygon animations
Displaying 3 d polygon animations
 
02 direct3 d_pipeline
02 direct3 d_pipeline02 direct3 d_pipeline
02 direct3 d_pipeline
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
 
september11.ppt
september11.pptseptember11.ppt
september11.ppt
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
Gdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_glGdc 14 bringing unreal engine 4 to open_gl
Gdc 14 bringing unreal engine 4 to open_gl
 
OpenGL Shading Language
OpenGL Shading LanguageOpenGL Shading Language
OpenGL Shading Language
 
13th kandroid OpenGL and EGL
13th kandroid OpenGL and EGL13th kandroid OpenGL and EGL
13th kandroid OpenGL and EGL
 
Introduction to OpenGL.ppt
Introduction to OpenGL.pptIntroduction to OpenGL.ppt
Introduction to OpenGL.ppt
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
 
OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
 
Programming with OpenGL
Programming with OpenGLProgramming with OpenGL
Programming with OpenGL
 
Open Standards for ADAS: Andrew Richards, Codeplay, at AutoSens 2016
Open Standards for ADAS: Andrew Richards, Codeplay, at AutoSens 2016Open Standards for ADAS: Andrew Richards, Codeplay, at AutoSens 2016
Open Standards for ADAS: Andrew Richards, Codeplay, at AutoSens 2016
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shaders
 

Último

怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
eeanqy
 
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
wpkuukw
 
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
nirzagarg
 
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
wpkuukw
 
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
gajnagarg
 
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
nirzagarg
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
yhavx
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
awasv46j
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion pills in Kuwait Cytotec pills in Kuwait
 

Último (20)

Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime PondicherryPondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
 
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best ServiceHigh Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
High Profile Escorts Nerul WhatsApp +91-9930687706, Best Service
 
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
怎样办理伯明翰大学学院毕业证(Birmingham毕业证书)成绩单留信认证
 
How to Create a Productive Workspace Trends and Tips.pdf
How to Create a Productive Workspace Trends and Tips.pdfHow to Create a Productive Workspace Trends and Tips.pdf
How to Create a Productive Workspace Trends and Tips.pdf
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahim
 
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
 
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
 
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
一比一定(购)滑铁卢大学毕业证(UW毕业证)成绩单学位证
 
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
Just Call Vip call girls Fatehpur Escorts ☎️8617370543 Two shot with one girl...
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
 
BLOCK CHAIN PROJECT block chain project
BLOCK CHAIN  PROJECT block chain projectBLOCK CHAIN  PROJECT block chain project
BLOCK CHAIN PROJECT block chain project
 
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Sonipat [ 7014168258 ] Call Me For Genuine Models W...
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
 
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfJordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
 
Eye-Catching Web Design Crafting User Interfaces .docx
Eye-Catching Web Design Crafting User Interfaces .docxEye-Catching Web Design Crafting User Interfaces .docx
Eye-Catching Web Design Crafting User Interfaces .docx
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
 
NO1 Top Pakistani Amil Baba Real Amil baba In Pakistan Najoomi Baba in Pakist...
NO1 Top Pakistani Amil Baba Real Amil baba In Pakistan Najoomi Baba in Pakist...NO1 Top Pakistani Amil Baba Real Amil baba In Pakistan Najoomi Baba in Pakist...
NO1 Top Pakistani Amil Baba Real Amil baba In Pakistan Najoomi Baba in Pakist...
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
 
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
 

Graphics Libraries

  • 2. Contents Overview Common Graphics Libraries PHIGS Features of PHIGS OpenGL OpenGL Pipeline Commands Direct3D How’s Direct3D Different? Conclusion References 03 04 05 06 07 08 09 14 15 16 17
  • 3. Overview • Today 3D graphics tools provide new methods in engineering, medicine, entertainment and technology • These are selected from exhaustive online research • Incorrect selection can lead to undesired results • A graphics library is a software interface to graphics hardware commonly called the APIs • It provides a set of graphics commands and functions which can specify primitive geometric models and their attributes to digitize and display
  • 4. Common Graphics Libraries A graphics programmer is should be able to program in at least one of the following: • OpenGL • Direct3D • PHIGS (Programmer's Hierarchical Interactive Graphics System) • GKS (Graphics Kernel System)
  • 5. PHIGS (Programmer's Hierarchical Interactive Graphics System) • An API standard for rendering 3D computer graphics through 1980s • Available as a standalone implementation like IBM’s GraPHIGS or Sun’s SunPHIGS • Became a standard by 1990s ( ANSI and ISO) • Supports only the most basic 3D graphics, including basic geometry and meshes • A combination of features of PHIGS and power led to the rise of OpenGL
  • 6. Features of PHIGS • Included a scene graph which is a data structure for storing logical sequences • Had a CSS (Centralized Structure Store) i.e. a database for storing primitives and their attributes • CSSes were shared under workstations to give views • Simple working: Model built into CSS Workstation created and opened  Model connected
  • 7. OpenGL (Open Graphics Library) • Most widely adopted graphics API • Easy to use, well documented • Cross platform and cross language • Everything is primitive (can accept only simple shapes and sizes) • Largely built on C but can be used in most programming languages
  • 9. void display(void) { int x, y; //a. generate a random point x = rand() %Width; y = rand() % Height; //b. specify a drawing color: red glColor3f(1, 0, 0); //c. specify to draw a point glBegin(GL_POINTS); glVertex2i (x,y); glEnd(); //d. start drawing glFlush(); } Basic Commands for Drawing and Shape void drawtriangle(float *v1, float *v2, float *v3) { glBegin(GL_TRIANGLES); glVertex3fv(v1); glVertex3fv(v2); glVertex3fv(v3); glEnd(); }
  • 10. Commands for Transformation glPushMatrix(); glLoadIdentity (); glRotatef (alpha, 0.0, 0.0, 1.0); drawArm (O, A); glTranslatef (A[0], A[1], 0.0); glRotatef (beta, 0.0, 0.0, 1.0); glTranslatef (-A[0], -A[1], 0.0); drawArm (A, B); glPopMatrix();
  • 11. Viewing static void reshape(int w, int h) { //a.specify modeling coordinates glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho(left, right, bottom, top, new, far); }
  • 12. Color and Lighting • Different colors for different vertices of the model can be specified • Light sources can be put to give different colors at different positions in the environment, so the model can have overall brightness, dull reflections, and/or shiny spots • Lighting can be achieved by calculating the color of a pixel • The normal of the pixel, the position of the viewer, and the colors and positions of the light sources inherently decide the lighting
  • 13. Transparency ▪ Used for transparent objects by implementing transmission coefficients for overlapping objects ▪ A final pixel’s R,G or B value depends on the blending of the corresponding R, G, or B values of the pixels in the overlapping objects through the transmission coefficients: Iλ = a1Iλ1 + a2 Iλ2, where λ is R, G, or B; Iλ the blended color component, a1 the transmission coefficient of the pixel in the first object, and Iλ1 the color of the first object.
  • 14. Direct3D • Graphics API for Microsoft Windows • Used to render 3D applications where performance is important like gaming environments • Implemented onWindows family of operating systems • Also on embedded versions of Xbox family of video game consoles
  • 15. How’s Direct3D Different? ▪ Portability – OpenGL is cross platform while Direct3D is Windows centric ▪ User Functionality – Direct3D is 3D hardware interface while OpenGL is 3D rendering system that could be hardware accelerated ▪ Performance – Direct3D is more suitable when performance is considered because of lighter codes ▪ Users/Applications – OpenGL has always seen more number of users. Direct3D is mostly used for computer games
  • 16.
  • 17. References ▪ http://www.opengl.org ▪ http://mohammadshakergtr.wordpress.com/ ▪ http://graphics.wikia.com/wiki/Direct3D_vs._OpenGL ▪ http://slideshare.net/OpenGL_Basics ▪ https://ilias.fhv.at/goto_ilias_fhv_at_file_225344_download .html