CS602 Assignment 3 Fall 2024 – Assignments – Solution VU

CS602 Assignment 3 Fall 2024 – Assignments – Solution VU

CS602 Assignment 3 Fall 2024 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, "BC125456789 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();

glfwTerminate();

 

Screenshots:

 

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.

 

 

Download attachment for CS602 assignment 3 solution file.

 

Students kindly share assignment files in relevant subject timely for discussion/solution.
or directly share with us ” Click here

QueryVU WhatsApp groups subject wise Join Now

#CS602 #Assignment #Fall #Assignments #Query

Leave a Reply

Your email address will not be published. Required fields are marked *