Summary

This document contains questions and answers related to OpenGL programming. The document covers topics such as vertex arrays and functions like glVertexPointer and glDrawElements.

Full Transcript

FA 4 MOD 6 SURE ANSWERS What data does the second parameter for the glVertexPointer() is for Group of answer choices The data type of each coordinate in the array The byte offset between consecutive vertices The number of coordinates per vertex A pointer to the first element of the vertex arra...

FA 4 MOD 6 SURE ANSWERS What data does the second parameter for the glVertexPointer() is for Group of answer choices The data type of each coordinate in the array The byte offset between consecutive vertices The number of coordinates per vertex A pointer to the first element of the vertex array Alternatively you can use glDrawElements() to render a vertex array, the 2nd parameter for the glDrawElements() function is the Group of answer choices Specifies the number of elements to be rendered The type of values in the indices Specifies a pointer to the location where the indices are stored What kind of primitives to render. What data does the third parameter for the glVertexPointer() is for Group of answer choices The number of coordinates per vertex A pointer to the first element of the vertex array The byte offset between consecutive vertices The data type of each coordinate in the array ___________ is used to render primitives from vertex and vertex state data stored in blocks of Group of answer choices Vertex Cache Vertex Storage Vertex Buffer Object Vertex Arrays What data does the last parameter for the glVertexPointer() is for Group of answer choices A pointer to the first element of the vertex array The data type of each coordinate in the array The byte offset between consecutive vertices The number of coordinates per vertex What OpenGL constant is used to activate the vertex array use in your application. Group of answer choices GL_VERTEX_VECTOR G_VERTEX_ARRAY GL_VERTEX_PERMISSION GL_VERTEX_STATE The first parameter in glVertexPointer() specifies the number of total vertex to be rendered on the screen Group of answer choices True False Alternatively you can use glDrawElements() to render a vertex array, the last parameter for the glDrawElements() function is the Group of answer choices The type of values in the indices What kind of primitives to render. Specifies the number of elements to be rendered Specifies a pointer to the location where the indices are stored In rendering the vertex arrays using glDrawArrays() function. The last parameter for the function indicates the. Group of answer choices None of the mentioned What kind of primitives to render Specifies the number of indices to be rendered. Specifies the starting index in the enabled arrays In OpenGL high-performance memory refers to your GPUs memory. Group of answer choices True False The glColorPointer has 4 parameters for the function to work. One of its parameter is the size, for the size it is the number of components per color. What is the minimum number of components? Group of answer choices 3 4 1 2 What OpenGL constant is used to activate the use of colors as arrays in your application. Group of answer choices GL_COLORARRAY GL_COLOR_ARRAY GL_COLORS GL_COLOR_VECTOR The glColorPointer has 4 parameters for the function to work. What is the purpose of the 1st parameter Group of answer choices Specifies the number of components per color Specifies the data type of each color component Specifies a pointer to the first component of the first color element in the array. Specifies the byteoffset between consecutive colors The glColorPointer has 4 parameters for the function to work. What is the purpose of the last parameter Group of answer choices Specifies the byteoffset between consecutive colors Specifies a pointer to the first component of the first color element in the array. Specifies the number of components per color Specifies the data type of each color component NOT SURE (May mali daw isa pero meron sa module e double check nlng) Complete the program to render the primitives below. Assume that arrays were declared already for use with the displayed primitives on the screen. Copy and paste the appropriate code to the blanks below: 1. glClear(GL_COLOR_BUFFER_BIT); 2. glColor3f(0.0f,1.0f,0.0f); 3. glDisableClientState(GL_COLOR_ARRAY); 4. glEnableClientState(GL_VERTEX_ARRAY); 5. glFlush(); 6. glVertexPointer(3, GL_FLOAT, 0, quadvertices);

Use Quizgecko on...
Browser
Browser