Suche senden
Hochladen
Development with OpenGL and Qt
•
2 gefällt mir
•
3,708 views
Ronny Yabar Aizcorbe
Folgen
Technologie
Melden
Teilen
Melden
Teilen
1 von 32
Empfohlen
OpenGL L01-Primitives
OpenGL L01-Primitives
Mohammad Shaker
Opengl presentation
Opengl presentation
elnaqah
Introduction to open gl in android droidcon - slides
Introduction to open gl in android droidcon - slides
tamillarasan
OpenGL Introduction
OpenGL Introduction
Jayant Mukherjee
Introduction to open_gl_in_android
Introduction to open_gl_in_android
tamillarasan
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5
Takao Wada
Programming using opengl in visual c++
Programming using opengl in visual c++
Ta Nam
OpenGL Introduction
OpenGL Introduction
Yi-Lung Tsai
Empfohlen
OpenGL L01-Primitives
OpenGL L01-Primitives
Mohammad Shaker
Opengl presentation
Opengl presentation
elnaqah
Introduction to open gl in android droidcon - slides
Introduction to open gl in android droidcon - slides
tamillarasan
OpenGL Introduction
OpenGL Introduction
Jayant Mukherjee
Introduction to open_gl_in_android
Introduction to open_gl_in_android
tamillarasan
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5
Takao Wada
Programming using opengl in visual c++
Programming using opengl in visual c++
Ta Nam
OpenGL Introduction
OpenGL Introduction
Yi-Lung Tsai
Programa de objetos 3 d wire
Programa de objetos 3 d wire
René Domínguez
Grafika komputer 2
Grafika komputer 2
Nur Fadli Utomo
Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)
Robi Parvez
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab report
Bijoy679
BYO3D 2011: Rendering
BYO3D 2011: Rendering
Matt Hirsch - MIT Media Lab
Tutorial Open GL (Listing Code)
Tutorial Open GL (Listing Code)
Aila Gema Safitri
OpenGL L03-Utilities
OpenGL L03-Utilities
Mohammad Shaker
Open gl tips
Open gl tips
Pedram Mazloom
Ujug07presentation
Ujug07presentation
Bill Adams
Ass day3 1_bd flag
Ass day3 1_bd flag
Robi Parvez
Robot by gulnaz
Robot by gulnaz
Gulnaz Akhter
Robot by gulnaz
Robot by gulnaz
Gulnaz Akhter
The Ring programming language version 1.5.4 book - Part 54 of 185
The Ring programming language version 1.5.4 book - Part 54 of 185
Mahmoud Samir Fayed
01.Opengl_intro-2.ppt
01.Opengl_intro-2.ppt
EngrZamaan
Bai 1
Bai 1
Châu Thanh Chương
Practicing 2d drawing primitives
Practicing 2d drawing primitives
Technology & Education
CGLabLec6.pptx
CGLabLec6.pptx
Mohammad7Abudosh7
2D Drawing
2D Drawing
Budditha Hettige
opengl.ppt
opengl.ppt
Subiksha57
Intro to Computer Graphics.ppt
Intro to Computer Graphics.ppt
adil104135
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
The Digital Insurer
Weitere ähnliche Inhalte
Ähnlich wie Development with OpenGL and Qt
Programa de objetos 3 d wire
Programa de objetos 3 d wire
René Domínguez
Grafika komputer 2
Grafika komputer 2
Nur Fadli Utomo
Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)
Robi Parvez
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab report
Bijoy679
BYO3D 2011: Rendering
BYO3D 2011: Rendering
Matt Hirsch - MIT Media Lab
Tutorial Open GL (Listing Code)
Tutorial Open GL (Listing Code)
Aila Gema Safitri
OpenGL L03-Utilities
OpenGL L03-Utilities
Mohammad Shaker
Open gl tips
Open gl tips
Pedram Mazloom
Ujug07presentation
Ujug07presentation
Bill Adams
Ass day3 1_bd flag
Ass day3 1_bd flag
Robi Parvez
Robot by gulnaz
Robot by gulnaz
Gulnaz Akhter
Robot by gulnaz
Robot by gulnaz
Gulnaz Akhter
The Ring programming language version 1.5.4 book - Part 54 of 185
The Ring programming language version 1.5.4 book - Part 54 of 185
Mahmoud Samir Fayed
01.Opengl_intro-2.ppt
01.Opengl_intro-2.ppt
EngrZamaan
Bai 1
Bai 1
Châu Thanh Chương
Practicing 2d drawing primitives
Practicing 2d drawing primitives
Technology & Education
CGLabLec6.pptx
CGLabLec6.pptx
Mohammad7Abudosh7
2D Drawing
2D Drawing
Budditha Hettige
opengl.ppt
opengl.ppt
Subiksha57
Intro to Computer Graphics.ppt
Intro to Computer Graphics.ppt
adil104135
Ähnlich wie Development with OpenGL and Qt
(20)
Programa de objetos 3 d wire
Programa de objetos 3 d wire
Grafika komputer 2
Grafika komputer 2
Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab report
BYO3D 2011: Rendering
BYO3D 2011: Rendering
Tutorial Open GL (Listing Code)
Tutorial Open GL (Listing Code)
OpenGL L03-Utilities
OpenGL L03-Utilities
Open gl tips
Open gl tips
Ujug07presentation
Ujug07presentation
Ass day3 1_bd flag
Ass day3 1_bd flag
Robot by gulnaz
Robot by gulnaz
Robot by gulnaz
Robot by gulnaz
The Ring programming language version 1.5.4 book - Part 54 of 185
The Ring programming language version 1.5.4 book - Part 54 of 185
01.Opengl_intro-2.ppt
01.Opengl_intro-2.ppt
Bai 1
Bai 1
Practicing 2d drawing primitives
Practicing 2d drawing primitives
CGLabLec6.pptx
CGLabLec6.pptx
2D Drawing
2D Drawing
opengl.ppt
opengl.ppt
Intro to Computer Graphics.ppt
Intro to Computer Graphics.ppt
Kürzlich hochgeladen
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
The Digital Insurer
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Architecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Zilliz
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Deepika Singh
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
apidays
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
apidays
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
The Digital Insurer
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
Kürzlich hochgeladen
(20)
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Architecting Cloud Native Applications
Architecting Cloud Native Applications
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Development with OpenGL and Qt
1.
3D Development with Qt
2.
Agenda
3D Concepts OpenGL Qt + OpenGL
3.
4.
5.
We need an API
6.
Graphics rendering API
7.
Current industry standard for 3D graphics
( Hi DirectX! )
8.
MultiPlatform
MultiLanguage Hardware Independent Open Standard
9.
More than 250 functions to produce
threedimensional scenes glColor, glVertex, glTranslate, glRotate ...
10.
Geometric Primitives
11.
12.
Camera Physical locations Projection properties
13.
Lighting glEnable ( GL_LIGHTING ) Lighting simulates how objects reflect light Material composition Light’s color and position Two sided GLfloat mred[4]= {1,0,0,1}; glMaterialfv(GL_FRONT, GL_AMBIENT, mred);
14.
Primitives are specified: glBegin(primitiveType); … … glEnd(); Example: glBegin(GL_TRIANGLES); glVertex3f( 0.0, 1.0, 0.0 ); glVertex3f( 1.0, 1.0, 0.0 ); glVertex3f( 1.0, 1.0, 0.0 ); glEnd();
15.
Color
16.
The human eye has 3 types of light receptor
cells glColor3f ( GLfloat red, GLfloat green, GLfloat blue );
17.
glBegin(GL_TRIANGLES); // red glColor3f( 1.0, 0.0, 0.0 ); glVertex3f( 0.0, 1.0, 0.0 ); // green glColor3f( 0.0, 1.0, 0.0 ); glVertex3f( 1.0, 1.0, 0.0 ); // blue glColor3f( 0.0, 0.0, 1.0 ); glVertex3f( 1.0, 1.0, 0.0 ); glEnd();
18.
Shading Smooth: glShadeModel ( GL_SMOOTH ); Flat: glShadeModel ( GL_FLAT );
19.
// Smooth shading glShadeModel(GL_SMOOTH); glBegin(GL_TRIANGLE_STRIP); glColor3( 0.0, 0.5, 0.0 ); glVertex3( 1.0, 0.5, 5.0 ); glColor3( 1.0, 0.0, 0.0 ); glVertex3( 1.0, 0.5, 5.0 ); glColor3( 1.0, 0.0, 0.0 ); glVertex3( 0.0, 0.5, 5.0 ); glColor3( 1.0, 0.0, 0.0 ); glVertex3( 1.5, 0.0, 5.0 ); glColor3( 0.0, 0.0, 1.0 ); glVertex3( 2.0, 1.5, 5.0 );
glEnd();
20.
// Flat shading glShadeModel(GL_FLAT); glBegin(GL_TRIANGLE_STRIP); glColor3( 0.0, 0.5, 0.0 ); glVertex3( 1.0, 0.5, 5.0 ); glColor3( 1.0, 0.0, 0.0 ); glVertex3( 1.0, 0.5, 5.0 ); glColor3( 1.0, 0.0, 0.0 ); glVertex3( 0.0, 0.5, 5.0 ); glColor3( 1.0, 0.0, 0.0 ); glVertex3( 1.5, 0.0, 5.0 ); glColor3( 0.0, 0.0, 1.0 ); glVertex3( 2.0, 1.5, 5.0 );
glEnd();
21.
glTexParameteri( GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR );
22.
23.
+
Qt OpenGL module
24.
#include <QGLWidget> class GLWidget : public QGLWidget { Q_OBJECT public: GLWidget( QWidget *parent=0 ); ~GLWidget(); ... protected: void initializeGL(); void resizeGL( int width, int height ); void paintGL(); private: ...
};
25.
void initializeGL(); void resizeGL( int width, int height ); void paintGL();
26.
void GLWidget::initializeGL()
{ // Smooth shading glShadeModel( GL_SMOOTH ); // Background color glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); > qglClearColor( Qt::black ); // Depth buffer setup glClearDepth( 1.0f ); // Enable depth testing glEnable( GL_DEPTH_TEST ); // Set type of depth test glDepthFunc( GL_LEQUAL ); }
27.
void GLWidget::resizeGL( int width, int height )
{ if ( height == 0 ) height = 1; // Reset current viewport GlViewport( 0, 0, width, height ); // Select projection matrix GlMatrixMode( GL_PROJECTION ); // Reset projection matrix glLoadIdentity(); // Select modelview matrix GlMatrixMode( GL_MODELVIEW ); // Reset modelview matrix glLoadIdentity();
28.
void GLWidget::paintGL()
{ glClear ( GL_COLOR_BUFFER_BIT ); // Reset the drawing perspective glLoadIdentity(); // triangle glBegin (GL_TRIANGLES); GlColor3f ( 1.0, 0.0, 0.0 ); glVertex3f ( 5.0, 5.0, 0.0 ); glColor3f ( 0.0, 1.0, 0.0 ); glVertex3f ( 25.0, 5.0, 0.0 ); glColor3f ( 0.0, 0.0, 1.0 ); GlVertex3f ( 5.0, 25.0, 0.0 ); glEnd(); }
29.
void GLWidget::drawtriangle() { glBegin ( GL_TRIANGLES ); glColor3f ( 1.0, 0.0, 0.0 ); glVertex3f ( 5.0, 5.0, 0.0 ); glColor3f ( 0.0, 1.0, 0.0 ); glVertex3f ( 25.0, 5.0, 0.0 ); glColor3f ( 0.0, 0.0, 1.0 ); glVertex3f ( 5.0, 25.0, 0.0 ); glEnd(); } void GLWidget::paintGL() { glClear ( GL_COLOR_BUFFER_BIT ); // Reset the drawing perspective glLoadIdentity();
drawTriangle();
30.
Demo Animation
31.
Demo Rotation
32.
Thanks
Ronny Yabar Aizcorbe ronnycontacto@gmail.com ronnyml.wordpress.com