From 70b40f67824b3d612235c382aa83821c054fa51e Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 17 Apr 2024 00:35:58 +0300 Subject: Object libraries like Vector2 optimizations. --- examples/rlgl_hello_triangle/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/rlgl_hello_triangle') diff --git a/examples/rlgl_hello_triangle/main.lua b/examples/rlgl_hello_triangle/main.lua index 571acb0..b9ebf9f 100644 --- a/examples/rlgl_hello_triangle/main.lua +++ b/examples/rlgl_hello_triangle/main.lua @@ -12,7 +12,7 @@ local triangle = { texture = { id = -1, data = nil, - size = Vec2:new(), + size = Vec2:new( 0, 0 ), mipmaps = 0, format = 0, }, @@ -60,7 +60,7 @@ local function loadTexture( path ) local image = RL.LoadImage( path ) triangle.texture.data = RL.GetImageData( image ) - triangle.texture.size = Vec2:new( RL.GetImageSize( image ) ) + triangle.texture.size = Vec2:newT( RL.GetImageSize( image ) ) triangle.texture.format = RL.GetImageFormat( image ) triangle.texture.mipmaps = RL.GetImageMipmaps( image ) @@ -131,8 +131,8 @@ local function createTriangle() end function RL.init() - local monitorPos = Vec2:new( RL.GetMonitorPosition( monitor ) ) - local monitorSize = Vec2:new( RL.GetMonitorSize( monitor ) ) + local monitorPos = Vec2:newT( RL.GetMonitorPosition( monitor ) ) + local monitorSize = Vec2:newT( RL.GetMonitorSize( monitor ) ) RL.SetWindowTitle( "RLGL Hello Triangle" ) RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) -- cgit v1.2.3