programs.Programs¶
Methods¶
-
Programs.
__init__
()¶ Initialize internal attributes
-
Programs.
load
(meta: moderngl_window.meta.program.ProgramDescription) → moderngl.program.Program[source]¶ Loads a shader program with the configured loaders
- Parameters:
meta (
ProgramDescription
) – The resource description- Returns:
The shader program
- Return type:
moderngl.Program
-
Programs.
add
(meta: moderngl_window.meta.base.ResourceDescription) → None¶ Adds a resource description without loading it. The resource is loaded and returned when
load_pool()
is called.- Parameters:
meta (ResourceDescription) – The resource description
-
Programs.
load_pool
() → Generator[Tuple[moderngl_window.meta.base.ResourceDescription, Any], None, None]¶ Loads all the data files using the configured finders.
This is only relevant when resource have been added to this pool using
add()
.- Returns:
Generator of (meta, resource) tuples
Attributes¶
-
Programs.
settings_attr
= 'PROGRAM_LOADERS'¶
-
Programs.
count
¶ The number of resource descriptions added. This is only relevant when using add and load_pool.
- Type:
int
-
Programs.
loaders
¶ Loader classes for this resource type
- Type:
Generator