SlideShare une entreprise Scribd logo
1  sur  18
Introduction
1
Name -- Muhammad Umer
Department -- Computer science
Semester -- 8th semester
Course instructor -- Faiz ur Rehman.
02
03
01
My presentation outline
2
What is openGl ?
Prerequisites for
openGl
Steps to downlaod
and install visual
studio
Downloading the zip
folder of openGL.
Copying the files to
targeted destinations
Working With Editor
05
06
04
Configuration of
openGL in visual
studio
In visual studio 2019
What is openGl ?
4
OpenGL is a 2D and 3D graphics API that
provides a cross-platform application
programming interface for a wide variety of
computer platforms. It is operating system
independent and has a transparent network.
Application developers use it to develop high-
performing and visually compelling graphics
software applications.
Prerequisites
5
Visual Studio 2019 (or any).
Microsoft Visual Studio is an integrated
development environment from Microsoft. It is
used to develop computer programs, as well as
websites, web apps, web services and mobile
apps.
Now let’s jump into the setup of OpenGL. To do
so follow the below steps:
Step 1: First we have to download Visual Studio 2019 for windows. Now
we have installed Visual Studio 2019 from its downloaded the .exe file
with Windows installer.
6
Step 2: Select Visual Studio community 2019 and click Modify, now
select the required components as shown in below image and
click install while Downloading
7
Step 2: It will take some time after it will be complete restart the
computer after the installation take place.
8
Step 2 Completed😍
Step 3: Now download GLUT header file, the .LIB, and .DLL files all pre-
compiled for Intel platforms, you can simply download
the glutdlls37beta.zip file from the website. (commented below)
9
Step 4: After this, we have to copy the file as instructed below:
10
• First, paste glut.h file in:
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCAuxiliaryVSincludegl
• Then paste glut.lib in:
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCAuxiliaryVSlibx64
• Then paste the glut32.lib in:
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCAuxiliaryVSlibx86
• Then paste glut.dll and glut32.dll in:
C:WindowsSysWOW64
• Finally copy glut32.dll to:
C:WindowsSystem32
Step 5: Now open the visual studio and create new project with some
name and press next to proceed.
11
Step 6: An interface will open and in the right panel click on source
files
12
Step 7: By clicking on the source files you will see the add option; click
on it
13
Step 8: by clicking on add multiple options will appear click on the new
item option and wait for opening the project item.
14
Step 8: select the c++ file and click add to proceed.
15
Step 9: Editor will be appear after adding the c++ item into the project.
Try the given code to check whether its working or not.
16
Step 5: After pasting the code into the editor panel you will see the
oval shape on the output screen. Enjoy your Coding.🥰
17
That’s all for my presentation I hope
you ENJOYED It.
Created by Muhammad Umer.
Downloaded the theme from
showeet.com
18

Contenu connexe

Similaire à openGl configuration_in visual studio 2019.pptx

Starting cilk development on windows
Starting cilk development on windowsStarting cilk development on windows
Starting cilk development on windowsMazen Abdulaziz
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdfRebaMaheen
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdfRebaMaheen
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?LOGINPHP360
 
Microsoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateMicrosoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateAdam John
 
Introduction to Android and Java.pptx
Introduction to Android and Java.pptxIntroduction to Android and Java.pptx
Introduction to Android and Java.pptxGandhiMathy6
 
Lesson 4 Introduction to Human Computer Interaction.pptx
Lesson 4 Introduction to Human Computer Interaction.pptxLesson 4 Introduction to Human Computer Interaction.pptx
Lesson 4 Introduction to Human Computer Interaction.pptxEllenGracePorras
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfacesdjdskjd9097
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfacecis247
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?LOGINPHP360
 
Android Studio Overview
Android Studio OverviewAndroid Studio Overview
Android Studio OverviewSalim Hosen
 
Kinect installation guide
Kinect installation guideKinect installation guide
Kinect installation guidegilmsdn
 
Android Application Development Environment Setup
Android Application Development Environment SetupAndroid Application Development Environment Setup
Android Application Development Environment SetupIan Pinto
 
Membangun Desktop App
Membangun Desktop AppMembangun Desktop App
Membangun Desktop AppFajar Baskoro
 
Develop android application with mono for android
Develop android application with mono for androidDevelop android application with mono for android
Develop android application with mono for androidNicko Satria Consulting
 
androidstudio.pptx
androidstudio.pptxandroidstudio.pptx
androidstudio.pptxSundaresanB5
 
How to develop a Flutter app.pdf
How to develop a Flutter app.pdfHow to develop a Flutter app.pdf
How to develop a Flutter app.pdfSmith Daniel
 

Similaire à openGl configuration_in visual studio 2019.pptx (20)

Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
Starting cilk development on windows
Starting cilk development on windowsStarting cilk development on windows
Starting cilk development on windows
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdf
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdf
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?
 
Microsoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateMicrosoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New Update
 
Introduction to Android and Java.pptx
Introduction to Android and Java.pptxIntroduction to Android and Java.pptx
Introduction to Android and Java.pptx
 
Lesson 4 Introduction to Human Computer Interaction.pptx
Lesson 4 Introduction to Human Computer Interaction.pptxLesson 4 Introduction to Human Computer Interaction.pptx
Lesson 4 Introduction to Human Computer Interaction.pptx
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interface
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?
 
Homestead demo
Homestead demoHomestead demo
Homestead demo
 
Android Studio Overview
Android Studio OverviewAndroid Studio Overview
Android Studio Overview
 
Kinect installation guide
Kinect installation guideKinect installation guide
Kinect installation guide
 
Android Application Development Environment Setup
Android Application Development Environment SetupAndroid Application Development Environment Setup
Android Application Development Environment Setup
 
Membangun Desktop App
Membangun Desktop AppMembangun Desktop App
Membangun Desktop App
 
Develop android application with mono for android
Develop android application with mono for androidDevelop android application with mono for android
Develop android application with mono for android
 
androidstudio.pptx
androidstudio.pptxandroidstudio.pptx
androidstudio.pptx
 
How to develop a Flutter app.pdf
How to develop a Flutter app.pdfHow to develop a Flutter app.pdf
How to develop a Flutter app.pdf
 
ANDROID PPT 1.pdf
ANDROID PPT 1.pdfANDROID PPT 1.pdf
ANDROID PPT 1.pdf
 

Dernier

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 

Dernier (20)

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 

openGl configuration_in visual studio 2019.pptx

  • 1. Introduction 1 Name -- Muhammad Umer Department -- Computer science Semester -- 8th semester Course instructor -- Faiz ur Rehman.
  • 2. 02 03 01 My presentation outline 2 What is openGl ? Prerequisites for openGl Steps to downlaod and install visual studio Downloading the zip folder of openGL. Copying the files to targeted destinations Working With Editor 05 06 04
  • 3. Configuration of openGL in visual studio In visual studio 2019
  • 4. What is openGl ? 4 OpenGL is a 2D and 3D graphics API that provides a cross-platform application programming interface for a wide variety of computer platforms. It is operating system independent and has a transparent network. Application developers use it to develop high- performing and visually compelling graphics software applications.
  • 5. Prerequisites 5 Visual Studio 2019 (or any). Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop computer programs, as well as websites, web apps, web services and mobile apps. Now let’s jump into the setup of OpenGL. To do so follow the below steps:
  • 6. Step 1: First we have to download Visual Studio 2019 for windows. Now we have installed Visual Studio 2019 from its downloaded the .exe file with Windows installer. 6
  • 7. Step 2: Select Visual Studio community 2019 and click Modify, now select the required components as shown in below image and click install while Downloading 7
  • 8. Step 2: It will take some time after it will be complete restart the computer after the installation take place. 8 Step 2 Completed😍
  • 9. Step 3: Now download GLUT header file, the .LIB, and .DLL files all pre- compiled for Intel platforms, you can simply download the glutdlls37beta.zip file from the website. (commented below) 9
  • 10. Step 4: After this, we have to copy the file as instructed below: 10 • First, paste glut.h file in: C:Program Files (x86)Microsoft Visual Studio2019CommunityVCAuxiliaryVSincludegl • Then paste glut.lib in: C:Program Files (x86)Microsoft Visual Studio2019CommunityVCAuxiliaryVSlibx64 • Then paste the glut32.lib in: C:Program Files (x86)Microsoft Visual Studio2019CommunityVCAuxiliaryVSlibx86 • Then paste glut.dll and glut32.dll in: C:WindowsSysWOW64 • Finally copy glut32.dll to: C:WindowsSystem32
  • 11. Step 5: Now open the visual studio and create new project with some name and press next to proceed. 11
  • 12. Step 6: An interface will open and in the right panel click on source files 12
  • 13. Step 7: By clicking on the source files you will see the add option; click on it 13
  • 14. Step 8: by clicking on add multiple options will appear click on the new item option and wait for opening the project item. 14
  • 15. Step 8: select the c++ file and click add to proceed. 15
  • 16. Step 9: Editor will be appear after adding the c++ item into the project. Try the given code to check whether its working or not. 16
  • 17. Step 5: After pasting the code into the editor panel you will see the oval shape on the output screen. Enjoy your Coding.🥰 17
  • 18. That’s all for my presentation I hope you ENJOYED It. Created by Muhammad Umer. Downloaded the theme from showeet.com 18

Notes de l'éditeur

  1. © Copyright Showeet.com – Creative & Free PowerPoint Templates
  2. https://www.opengl.org/resources/libraries/glut/glut_downloads.php
  3. https://www.opengl.org/resources/libraries/glut/glut_downloads.php
  4. #include <GL/glut.h> #include<iostream> using namespace std; int rx = 100, ry = 125; int xCenter = 250, yCenter = 250; void myinit(void) { glClearColor(1.0, 1.0, 1.0, 0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0, 640.0, 0.0, 480.0); } void setPixel(GLint x, GLint y) { glBegin(GL_POINTS); glVertex2i(x, y); glEnd(); } void ellipseMidPoint() { float x = 0; float y = ry; float p1 = ry * ry - (rx * rx) * ry + (rx * rx) * (0.25); float dx = 2 * (ry * ry) * x; float dy = 2 * (rx * rx) * y; glColor3ub(rand() % 255, rand() % 255, rand() % 255); while (dx < dy) { setPixel(xCenter + x, yCenter + y); setPixel(xCenter - x, yCenter + y); setPixel(xCenter + x, yCenter - y); setPixel(xCenter - x, yCenter - y); if (p1 < 0) { x = x + 1; dx = 2 * (ry * ry) * x; p1 = p1 + dx + (ry * ry); } else { x = x + 1; y = y - 1; dx = 2 * (ry * ry) * x; dy = 2 * (rx * rx) * y; p1 = p1 + dx - dy + (ry * ry); } } glFlush(); float p2 = (ry * ry) * (x + 0.5) * (x + 0.5) + (rx * rx) * (y - 1) * (y - 1) - (rx * rx) * (ry * ry); glColor3ub(rand() % 255, rand() % 255, rand() % 255); while (y > 0) { setPixel(xCenter + x, yCenter + y); setPixel(xCenter - x, yCenter + y); setPixel(xCenter + x, yCenter - y); setPixel(xCenter - x, yCenter - y); if (p2 > 0) { x = x; y = y - 1; dy = 2 * (rx * rx) * y; p2 = p2 - dy + (rx * rx); } else { x = x + 1; y = y - 1; dy = dy - 2 * (rx * rx); dx = dx + 2 * (ry * ry); p2 = p2 + dx - dy + (rx * rx); } } glFlush(); } void display() { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 0.0, 0.0); glPointSize(2.0); ellipseMidPoint(); glFlush(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitWindowSize(640, 480); glutInitWindowPosition(10, 10); glutCreateWindow("User_Name"); myinit(); glutDisplayFunc(display); glutMainLoop(); return 0; }