Skip to content

Commit

Permalink
Check on new boxy too!
Browse files Browse the repository at this point in the history
  • Loading branch information
treeform committed Jul 19, 2023
1 parent 1adb475 commit 8809974
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/boxy.nim
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,13 @@ proc newBoxy*(
glGetIntegerv(GL_MAX_TEXTURE_SIZE, maxAtlasSize.addr)
result.maxAtlasSize = maxAtlasSize

if result.maxAtlasSize < result.atlasSize:
raise newException(
BoxyError,
"Requested atlas texture is larger then max supported size: " &
$result.maxAtlasSize
)

proc grow(boxy: Boxy) =
## Grows the atlas size by 2 (growing area by 4).

Expand Down

0 comments on commit 8809974

Please sign in to comment.