Skip to content

Commit

Permalink
add overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Dec 24, 2023
1 parent 1f62ede commit 5c24426
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/raylib.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2636,6 +2636,12 @@ proc texture*(x: MaterialMap): lent Texture {.inline.} =
proc shader*(x: Material): lent Shader {.inline.} =
result = x.shader

proc texture*(x: var MaterialMap): var Texture {.inline.} =
result = x.texture

proc shader*(x: var Material): var Shader {.inline.} =
result = x.shader

template meshes*(x: Model): ModelMeshes = ModelMeshes(x)

proc `[]`*(x: ModelMeshes, i: int): lent Mesh =
Expand Down
6 changes: 6 additions & 0 deletions tools/raylib_fields.nim
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ proc texture*(x: MaterialMap): lent Texture {.inline.} =
proc shader*(x: Material): lent Shader {.inline.} =
result = x.shader

proc texture*(x: var MaterialMap): var Texture {.inline.} =
result = x.texture

proc shader*(x: var Material): var Shader {.inline.} =
result = x.shader

template meshes*(x: Model): ModelMeshes = ModelMeshes(x)

proc `[]`*(x: ModelMeshes, i: int): lent Mesh =
Expand Down

0 comments on commit 5c24426

Please sign in to comment.