22
22
from arcade .gl .framebuffer import Framebuffer
23
23
from arcade .gl .program import Program
24
24
from arcade .gl .texture import Texture2D
25
+ from arcade .gl .types import PyGLenum
25
26
from arcade .gl .vertex_array import Geometry
26
27
from arcade .texture_atlas import DefaultTextureAtlas , TextureAtlasBase
27
28
@@ -451,8 +452,12 @@ def load_texture(
451
452
path : str | Path ,
452
453
* ,
453
454
flip : bool = True ,
455
+ wrap_x : PyGLenum | None = None ,
456
+ wrap_y : PyGLenum | None = None ,
457
+ filter : tuple [PyGLenum , PyGLenum ] | None = None ,
454
458
build_mipmaps : bool = False ,
455
459
internal_format : int | None = None ,
460
+ immutable : bool = False ,
456
461
compressed : bool = False ,
457
462
) -> Texture2D :
458
463
"""
@@ -479,6 +484,12 @@ def load_texture(
479
484
Path to texture
480
485
flip:
481
486
Flips the image upside down. Default is ``True``.
487
+ wrap_x:
488
+ The wrap mode for the x-axis. Default is ``None``.
489
+ wrap_y:
490
+ The wrap mode for the y-axis. Default is ``None``.
491
+ filter:
492
+ The min and mag filter. Default is ``None``.
482
493
build_mipmaps:
483
494
Build mipmaps for the texture. Default is ``False``.
484
495
internal_format (optional):
@@ -501,7 +512,11 @@ def load_texture(
501
512
image .size ,
502
513
components = 4 ,
503
514
data = image .convert ("RGBA" ).tobytes (),
515
+ wrap_x = wrap_x ,
516
+ wrap_y = wrap_y ,
517
+ filter = filter ,
504
518
internal_format = internal_format ,
519
+ immutable = immutable ,
505
520
compressed = compressed ,
506
521
)
507
522
image .close ()
0 commit comments