1/31
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Window
Graphical interface element that displays the application’s content.
Startup Stage
Initial phase where objects are created, values are set, and files are loaded.
Main Loop
Continuous cycle while the program is running, consisting of:
Process Input
Detects user actions (keyboard/mouse).
Update
Changes object values and game variables.
Render
Draws/creates graphics for display.
Shutdown Stage
Final phase, stops user input processing and closes application windows.
Pygame
A Python library used for creating video games and graphics applications.
pygame.display.set_mode()
Function to create a window; requires width and height (e.g., (500, 500)
).
Point
The most basic graphical element; a single location in space.
Vertex Shader
A program that runs once per vertex to compute its position in 3D space.
gl_Position
A built-in GLSL variable storing the current vertex position.
GLSL (OpenGL Shading Language)
Shader programming language used in OpenGL.
main() function (in GLSL)
Required function in every shader; entry point of shader code.
Vector Types (vec2, vec3, vec4)
GLSL data types for storing 2D, 3D, and 4D values (e.g., position, color).
w (4th component of vec4)
Controls clipping of vertex positions in 3D space, default is 1.0.
glBegin() & glEnd()
Functions that define the start and end of specifying vertices for a shape.
glVertex3f(x, y, z)
Specifies the position of a vertex in 3D space using float values.
Primitive
A basic shape in OpenGL (points, lines, triangles).
Primitive Assembly
Process of grouping vertices into shapes (e.g., triangles, strips, fans).
Uniform Variables
Global shader variables with constant values while drawing a shape (e.g., shared color, translation).
uniform (type qualifier)
Declares a variable in GLSL as a uniform variable.
glGetUniformLocation(programRef, variableName)
Function that retrieves the memory reference for a uniform variable inside a shader program.
Return value -1
Indicates the uniform variable does not exist or is not used in the shader.
Event
An action detected by the system (e.g., key pressed, mouse moved).
Keydown Event
Triggered when a key is pressed.
Keyup Event
Triggered when a key is released.
Discrete Event
Happens only once at a specific moment (e.g., pressing a key).
Continuous Event
Persists as long as the action is maintained (e.g., holding down a key to move a character).
pygame.KEYDOWN / pygame.KEYUP
Constants for detecting key press and release events.
pygame.K_w, pygame.K_a, pygame.K_s, pygame.K_d
Constants for detecting WASD key presses (used in movement controls).