Last active
April 28, 2020 06:05
-
-
Save rajan9519/1cd8382dd6af94f75a3dd67a4fd4f889 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void visual(int* arr){ | |
| glClear(GL_COLOR_BUFFER_BIT); // sets the previous background with the current background | |
| drawBitmapString(400,570,sortName); | |
| drawBitmapString(400,550,"Number of Compares:"+std::to_string(compares)); | |
| drawBitmapString(400,530,"Number of Exchanges:"+std::to_string(exchanges)); | |
| glColor3f(1.0f,0.0f,0.0f); //red | |
| // drawing bars on the screen by diagonal coordinates | |
| for(int i=0;i<N;i++){ | |
| glRecti(4*i,0,4*i+3,arr[i]); | |
| } | |
| glFlush(); | |
| usleep(150); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment