Computer-Graphics-Handout2

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
GameKnowt Play
New
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/31

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

32 Terms

1
New cards

Window

Graphical interface element that displays the application’s content.

2
New cards

Startup Stage

Initial phase where objects are created, values are set, and files are loaded.

3
New cards

Main Loop

Continuous cycle while the program is running, consisting of:

4
New cards

Process Input

Detects user actions (keyboard/mouse).

5
New cards

Update

Changes object values and game variables.

6
New cards

Render

Draws/creates graphics for display.

7
New cards

Shutdown Stage

Final phase, stops user input processing and closes application windows.

8
New cards

Pygame

A Python library used for creating video games and graphics applications.

9
New cards

pygame.display.set_mode()

Function to create a window; requires width and height (e.g., (500, 500)).

10
New cards

Point

The most basic graphical element; a single location in space.

11
New cards

Vertex Shader

A program that runs once per vertex to compute its position in 3D space.

12
New cards

gl_Position

A built-in GLSL variable storing the current vertex position.

13
New cards

GLSL (OpenGL Shading Language)

Shader programming language used in OpenGL.

14
New cards

main() function (in GLSL)

Required function in every shader; entry point of shader code.

15
New cards

Vector Types (vec2, vec3, vec4)

GLSL data types for storing 2D, 3D, and 4D values (e.g., position, color).

16
New cards

w (4th component of vec4)

Controls clipping of vertex positions in 3D space, default is 1.0.

17
New cards

glBegin() & glEnd()

Functions that define the start and end of specifying vertices for a shape.

18
New cards

glVertex3f(x, y, z)

Specifies the position of a vertex in 3D space using float values.

19
New cards

Primitive

A basic shape in OpenGL (points, lines, triangles).

20
New cards

Primitive Assembly

Process of grouping vertices into shapes (e.g., triangles, strips, fans).

21
New cards

Uniform Variables

Global shader variables with constant values while drawing a shape (e.g., shared color, translation).

22
New cards

uniform (type qualifier)

Declares a variable in GLSL as a uniform variable.

23
New cards

glGetUniformLocation(programRef, variableName)

Function that retrieves the memory reference for a uniform variable inside a shader program.

24
New cards

Return value -1

Indicates the uniform variable does not exist or is not used in the shader.

25
New cards

Event

An action detected by the system (e.g., key pressed, mouse moved).

26
New cards

Keydown Event

Triggered when a key is pressed.

27
New cards

Keyup Event

Triggered when a key is released.

28
New cards

Discrete Event

Happens only once at a specific moment (e.g., pressing a key).

29
New cards

Continuous Event

Persists as long as the action is maintained (e.g., holding down a key to move a character).

30
New cards

pygame.KEYDOWN / pygame.KEYUP

Constants for detecting key press and release events.

31
New cards

pygame.K_w, pygame.K_a, pygame.K_s, pygame.K_d

Constants for detecting WASD key presses (used in movement controls).

32
New cards