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
|
|
@ -15,10 +15,10 @@ pub fn main() anyerror!void {
|
|||
rl.initWindow(screenWidth, screenHeight, "raylib [shaders] example - Apply an outline to a texture");
|
||||
defer rl.closeWindow(); // Close window and OpenGL context
|
||||
|
||||
const texture: rl.Texture = rl.Texture.init("resources/textures/fudesumi.png");
|
||||
const texture: rl.Texture = try rl.Texture.init("resources/textures/fudesumi.png");
|
||||
defer rl.unloadTexture(texture);
|
||||
|
||||
const shdrOutline: rl.Shader = rl.loadShader(null, "resources/shaders/glsl330/outline.fs");
|
||||
const shdrOutline: rl.Shader = try rl.loadShader(null, "resources/shaders/glsl330/outline.fs");
|
||||
defer rl.unloadShader(shdrOutline);
|
||||
|
||||
var outlineSize: f32 = 2.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue