Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use OpenGL dev-c++ , Please modify this code to do the following: #ifdef __APPLE_CC__ #include #else #include #endif //#include // Note: this automatically includes other

use OpenGL dev-c++ , Please modify this code to do the following:
#ifdef __APPLE_CC__ #include  #else #include  #endif //#include  // Note: this automatically includes other void init(void) { glClearColor(1.0, 1.0, 1.0, 0.0); // set the background to white glMatrixMode(GL_PROJECTION); // set projection parameters glLoadIdentity(); gluOrtho2D(0, 10, 0, 10); } ////////////////////////////////////////// void draw(){ glClear(GL_COLOR_BUFFER_BIT); // Clear display window // your code goes here glFlush(); } //------------------------------------------------------------------- ///////////////////////////////////////////// int main(int argc, char **argv) { glutInit(&argc, argv); // Initialize GLUT glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); // Set display mode glutInitWindowPosition(100, 200); // Set top-left display window position glutInitWindowSize(500, 500); // Set display window width and height glutCreateWindow("Lab 6");// Create display window init(); // Execute initialization procedure glutDisplayFunc(draw); // Send graphics to display window glutMainLoop(); // Display everything and wait }

image text in transcribed

the attached program; lab6_problem1.cpp 1. Set the world coordinates to be: - Xmin=6 - Xmax=6 - Ymin=6 - Ymax=6 2. Create a red square with the following coordinates: - Square =(1,1,0),(1,4,0),(5,4,0),(5,1,0) 3. Draw the x,y Coordinate lines in blue. At this point, your program should display the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions