1/53
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Based on the graphics pipeline, the first step to render graphics.
Developing an application where the graphics will be displayed
A graphical interface element that displays an application's content.
A window
The three phases of an interactive and graphics-based windowed application.
Startup, Main Loop, and Shutdown
The phase during which objects are created, values are initialized, and any required external files are loaded.
Startup
The phase that repeats continuously while the application is running.
Main Loop
The three substages of the Main Loop.
Process Input, Update, and Render
Checks if the user has performed any action that sends data to the computer, such as pressing keys on a keyboard or clicking buttons on a mouse.
Process Input
Changes values of variables and objects.
Update
Creates graphics that are displayed on the screen.
Render
The phase that typically begins when the user performs an action indicating that the program should stop, such as clicking a button to quit.
Shutdown
Tasks the Shutdown phase may involve, such as signaling the application to stop checking for user input.
Signaling the application to stop checking for user input and closing any windows created by the application
A set of Python modules designed for creating video games, a popular Python game development library.
Pygame
The method used to set up a window using Pygame.
pygame.display.set_mode()
The number of parameters the pygame.display.set_mode() method requires, to define the width and height of the window.
Two (2)
The example code given in the handout to create a 500x500 window using Pygame.
screen = pygame.display.set_mode((500, 500))
A location in space, the most basic graphical element.
A point
What is used to render a single point on the screen.
A vertex shader
What every shader must contain.
A main() function
What the void keyword indicates in a shader's main function, and what parameters the main function requires.
No values are returned; the main function requires no parameters
What vertex shaders manipulate, and how often they are called.
Coordinates in a 3D space; called once per vertex
The purpose of the vertex shader, setting up this special, global, and built-in GLSL variable.
gl_Position
What gl_Position is used to store.
The position of the current vertex
The GLSL data types often used for storing values that indicate positions, colors, and texture coordinates.
Vector data types
The GLSL keywords indicating vectors with two, three, or four components consisting of floats.
vec2, vec3, and vec4
What the four float values in a vec4 represent, for the vertex's position.
The vertex's x, y, z, and w positions
The purpose of the fourth (w) parameter of a vec4 position, and its default value.
Used to manipulate the clipping of the vertex position in the 3D space; default value is 1.0
What every vertex shader will use arrays of data stored in.
Vertex buffers
Why multiple points are needed, to specify the shapes of two-dimensional or three-dimensional objects.
Multiple points are needed to specify the shapes of 2D or 3D objects
The OpenGL function call used to specify each of a triangle's vertices.
glVertex3f
Between which two calls vertices must be specified.
glBegin and glEnd
What the parameter to glBegin tells.
Which type of primitive is being drawn
The most flexible and efficient way to repeatedly use the same information in computer graphics, such as translating all vertices by the same amount.
Using uniform variables
Global variables that can be accessed by the vertex shader or the fragment shader, whose values are constant while each shape is being drawn.
Uniform variables
What can change uniform variable values, even though they are constant while each shape is being drawn.
Between draw function calls
The type qualifier used to declare uniform shader variables.
uniform
What uniform shader variables provide a mechanism for, from a CPU application to a GPU program.
Directly sending data from variables in a CPU application to variables in a GPU program
What must be obtained before data may be sent to a uniform variable.
A reference to the location of the uniform variable
The OpenGL function used to obtain a reference to a uniform variable's location.
glGetUniformLocation(programRef, variableName)
What the variableName parameter of glGetUniformLocation indicates.
The name of the uniform variable
What the programRef parameter of glGetUniformLocation indicates.
The program in which the uniform variable is declared
What glGetUniformLocation returns if the variable is not declared or not used in the specified program.
-1
What the Pygame library provides support for working with.
User input events
The two types of key events Pygame detects.
Keydown events and keyup events
The moment keydown events occur.
The moment a key is initially pressed
The moment keyup events occur.
The moment the key is released
What an event is said to be if it happens once at an isolated point in time.
Discrete
What an event is said to be if it continues happening during an interval of time.
Continuous
Whether keydown and keyup events are discrete or continuous.
Discrete
The example of a continuous action given in the handout, that occurs for as long as a key is being held down.
Moving an object on the screen
The Pygame event type constant checked to determine if a keydown event has occurred.
pygame.KEYDOWN
The Pygame key constant checked in the sample code that prints 'Player moved up!'
pygame.K_w
The Pygame key constant checked in the sample code that prints 'Player moved left!'
pygame.K_a
The Pygame key constant checked in the sample code that prints 'Player moved down!'
pygame.K_s
The Pygame key constant checked in the sample code that prints 'Player moved right!'
pygame.K_