Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS602 Computer Graphics Assignment No 03 Fall 2020 Solution & Discussion

Views: 556

Replies to This Discussion

Share the Assignment Questions & Discuss Here.... 

Stay touched with this discussion, Solution idea will be uploaded as soon as possible in replies here before the due date.


Click on the below link to download the file


CS602 Computer Graphics Assignment No 03 Fall 2020 Solution links files

Click on the below link to download the file




Click on the below link to download the file


CS602 Assignment 3 Fall 2020 solution idea:


Question No: 01

Solution: -

Source Code:-

#include <GL/glew.h> #include <GLFW/glfw3.h> int main()


GLFWwindow* window; if (!glfwInit())


return -1;


window = glfwCreateWindow(400, 300, "BC123456789 Name", NULL, NULL); if (!window)


glfwTerminate(); return -1;


glfwMakeContextCurrent(window); glViewport(0, 0, 800, 800);

glClearColor(30, 20, 40, 0); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window);

while (!glfwWindowShouldClose(window))


glClearColor(30, 40, 0, 0); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwPollEvents();




Question 01

Source Code (2)


#include <GL/glut.h>




void draw(){





void initialize(){

     glClearColor(1.0, 0.0, 0.0, 1.0); // RED COLOR





int main(int iArgc,char** cppArgv){

     glutInit(&iArgc, cppArgv);

     glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);

     glutInitWindowSize(600, 400);       // WINDOW SIZE

     glutInitWindowPosition(200, 200);

     glutCreateWindow("BC123456789  Nabeel");




     return EXIT_SUCCESS;


Output Screen Shot

Question No: 02 Solution: -

Nearly everything you may ever do with OpenGL will involve buffers full of data. Buffers in OpenGL are depicted as buffer objects. As with several things in OpenGL, buffer objects are named using GLuint values. Values are stored using the glGenBuffers () command.

Example: void glGenBuffers(GLsizei n, GLuint *buffers);

After calling glGenBuffers(),you will have an array of buffer object names in buffers, but at this time, they’re simply placeholders. They’re not really buffer objects yet. The buffer objects themselves don't seem to be really created till the name is first sure to one of the buffer binding points on the context. this can be important as a result of OpenGL could build choices regarding the most effective way to assign memory for the buffer object based on where it's bound.

Yhi mila mujhy bhi O_o (
Jazak Allah Khair <3


Looking For Something? Search Below

VIP Member Badge & Others

How to Get This Badge at Your Profile DP


Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service