More defer
This commit is contained in:
parent
183cc437ac
commit
f50189fdd0
12 changed files with 21 additions and 64 deletions
|
|
@ -13,10 +13,13 @@ pub fn main() anyerror!void {
|
|||
const screenHeight = 450;
|
||||
|
||||
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");
|
||||
defer rl.unloadTexture(texture);
|
||||
|
||||
const shdrOutline: rl.Shader = rl.loadShader(null, "resources/shaders/glsl330/outline.fs");
|
||||
defer rl.unloadShader(shdrOutline);
|
||||
|
||||
var outlineSize: f32 = 2.0;
|
||||
const outlineColor = [4]f32{ 1.0, 0.0, 0.0, 1.0 }; // Normalized RED color
|
||||
|
|
@ -66,13 +69,4 @@ pub fn main() anyerror!void {
|
|||
rl.endDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
rl.unloadTexture(texture);
|
||||
rl.unloadShader(shdrOutline);
|
||||
|
||||
rl.closeWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue