Error check using IsValid functions and return error unions (#191)
* Verify shaders are valid * Verify images are valid * Verify models are valid * Verify materials are valid * Verify textures are valid * Verify render textures are valid * Verify waves are valid * Verify sounds are valid * Verify music is valid * Verify audio streams are valid * Verify fonts are valid * Update examples to handle error unions
This commit is contained in:
parent
30ce68004f
commit
41022159ad
8 changed files with 475 additions and 188 deletions
|
|
@ -20,9 +20,9 @@ pub fn main() anyerror!void {
|
|||
|
||||
// NOTE: Be careful, background width must be equal or bigger than screen width
|
||||
// if not, texture should be draw more than two times for scrolling effect
|
||||
const background = rl.loadTexture("resources/textures/cyberpunk_street_background.png");
|
||||
const midground = rl.loadTexture("resources/textures/cyberpunk_street_midground.png");
|
||||
const foreground = rl.loadTexture("resources/textures/cyberpunk_street_foreground.png");
|
||||
const background = try rl.loadTexture("resources/textures/cyberpunk_street_background.png");
|
||||
const midground = try rl.loadTexture("resources/textures/cyberpunk_street_midground.png");
|
||||
const foreground = try rl.loadTexture("resources/textures/cyberpunk_street_foreground.png");
|
||||
defer rl.unloadTexture(background); // Unload background texture
|
||||
defer rl.unloadTexture(midground); // Unload midground texture
|
||||
defer rl.unloadTexture(foreground); // Unload foreground texture
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue