2222from arcade .gl .framebuffer import Framebuffer
2323from arcade .gl .program import Program
2424from arcade .gl .texture import Texture2D
25+ from arcade .gl .types import PyGLenum
2526from arcade .gl .vertex_array import Geometry
2627from arcade .texture_atlas import DefaultTextureAtlas , TextureAtlasBase
2728
@@ -451,8 +452,12 @@ def load_texture(
451452 path : str | Path ,
452453 * ,
453454 flip : bool = True ,
455+ wrap_x : PyGLenum | None = None ,
456+ wrap_y : PyGLenum | None = None ,
457+ filter : tuple [PyGLenum , PyGLenum ] | None = None ,
454458 build_mipmaps : bool = False ,
455459 internal_format : int | None = None ,
460+ immutable : bool = False ,
456461 compressed : bool = False ,
457462 ) -> Texture2D :
458463 """
@@ -479,6 +484,12 @@ def load_texture(
479484 Path to texture
480485 flip:
481486 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``.
482493 build_mipmaps:
483494 Build mipmaps for the texture. Default is ``False``.
484495 internal_format (optional):
@@ -501,7 +512,11 @@ def load_texture(
501512 image .size ,
502513 components = 4 ,
503514 data = image .convert ("RGBA" ).tobytes (),
515+ wrap_x = wrap_x ,
516+ wrap_y = wrap_y ,
517+ filter = filter ,
504518 internal_format = internal_format ,
519+ immutable = immutable ,
505520 compressed = compressed ,
506521 )
507522 image .close ()
0 commit comments