<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS602 Assignment 3 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/1142/cs602-assignment-3-solution-and-discussion">CS602 Assignment 3 Solution and Discussion</a></p>
<pre><code>Total Marks = [20]
</code></pre>
<p dir="auto">Assignment No. 03<br />
Semester: Fall 2020<br />
Computer Graphics – CS602	<br />
Total Marks: 20</p>
<p dir="auto">Due Date:<br />
February 08, 2020</p>
<p dir="auto">Objectives:<br />
Objective of this assignment is to assess the understanding of students about<br />
the concepts of Open GL programming in computer graphics.<br />
Instructions:<br />
Please read the following instructions carefully before submitting assignment:</p>
<ol>
<li>You should consult the recommended books, PowerPoint slides and audio lectures to clarify your concepts.</li>
<li>You are supposed to submit your assignment in .doc format. Any other formats like scan images, PDF, ZIP, RAR and BMP etc, will not be accepted.</li>
<li>It should be clear that your assignment will not get any credit if:<br />
•	The assignment is submitted after the due date.<br />
•	The assignment is copied from the Internet or any other student.<br />
•	The submitted assignment does not open or file is corrupt.<br />
Note: No assignment will be accepted after the due date through email in any case (load shedding, server down, internet malfunctioning etc.).<br />
It is recommended to upload solution file at least two days before its closing date.<br />
For any query about the assignment, contact at <a href="mailto:cs602@vu.edu.pk" target="_blank" rel="noopener noreferrer nofollow ugc">cs602@vu.edu.pk</a></li>
</ol>
<p dir="auto">Question Statement                                                                                                               Marks=15<br />
Question # 1:<br />
Write a program using Open GL Programming to create a window as shown in the below image. The title of window should be your Student Id and your Name. You can fill the window area with any color.<br />
<img src="https://i.imgur.com/8qOZFBs.png" alt="cab41c1a-137a-4174-a0fd-a2759b9567a4-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Hint: Initialize the GLFW and GLEW libraries using the commands glfwInit() and glewInit() respectively.</p>
<p dir="auto">Question # 2:<br />
What are the Open GL Buffers and how can you create and allocate these buffers. Discuss with an example.</p>
<p dir="auto">Note: Only write the statement of creation and allocation. No need to write the complete program.<br />
BEST OF LUCK</p>
]]></description><link>https://community.secnto.com//topic/2178/cs602-assignment-3-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 22:42:07 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/2178.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Feb 2021 06:55:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS602 Assignment 3 Solution and Discussion on Tue, 09 Feb 2021 06:57:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wafa-sehar" aria-label="Profile: wafa-sehar">@<bdi>wafa-sehar</bdi></a> said in <a href="/post/6452">CS602 Assignment 3 Solution and Discussion</a>:</p>
<blockquote>
<p dir="auto">Question # 2:<br />
What are the Open GL Buffers and how can you create and allocate these buffers. Discuss with an example.</p>
</blockquote>
<p dir="auto">Nearly everything you may ever do with OpenGL will involve buffers full of data. Buffers in<br />
OpenGL are depicted as buffer objects. As with several things in OpenGL, buffer objects are<br />
named using GLuint values. Values are stored using the glGenBuffers () command.<br />
Example: void glGenBuffers(GLsizei n, GLuint *buffers);<br />
After calling glGenBuffers(),you will have an array of buffer object names in buffers, but at this<br />
time, they’re simply placeholders. They’re not really buffer objects yet. The buffer objects<br />
themselves don’t seem to be really created till the name is first sure to one of the buffer binding<br />
points on the context. this can be important as a result of OpenGL could build choices regarding<br />
the most effective way to assign memory for the buffer object based on where it’s bound.</p>
]]></description><link>https://community.secnto.com//post/6454</link><guid isPermaLink="true">https://community.secnto.com//post/6454</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Tue, 09 Feb 2021 06:57:17 GMT</pubDate></item><item><title><![CDATA[Reply to CS602 Assignment 3 Solution and Discussion on Tue, 09 Feb 2021 06:56:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zaasmi" aria-label="Profile: zaasmi">@<bdi>zaasmi</bdi></a> said in <a href="/post/6452">CS602 Assignment 3 Solution and Discussion</a>:</p>
<blockquote>
<p dir="auto">Write a program using Open GL Programming to create a window as shown in the below image. The title of window should be your Student Id and your Name. You can fill the window area with any color.</p>
</blockquote>
<pre><code>#include &lt;GL/glew.h&gt; #include &lt;GLFW/glfw3.h&gt; 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();
}
glfwTerminate(); }
</code></pre>
]]></description><link>https://community.secnto.com//post/6453</link><guid isPermaLink="true">https://community.secnto.com//post/6453</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Tue, 09 Feb 2021 06:56:42 GMT</pubDate></item></channel></rss>