summaryrefslogtreecommitdiff
path: root/examples/rlgl_hello_triangle/main.lua
diff options
context:
space:
mode:
authorjussi2024-04-17 00:35:58 +0300
committerjussi2024-04-17 00:35:58 +0300
commit70b40f67824b3d612235c382aa83821c054fa51e (patch)
tree5d594cc457d6fed8af87e31977a0b9352677a4f5 /examples/rlgl_hello_triangle/main.lua
parent41b67398247d9031aed4ca6e3ffd6799ec8b1bca (diff)
downloadreilua-enhanced-70b40f67824b3d612235c382aa83821c054fa51e.tar.gz
reilua-enhanced-70b40f67824b3d612235c382aa83821c054fa51e.tar.bz2
reilua-enhanced-70b40f67824b3d612235c382aa83821c054fa51e.zip
Object libraries like Vector2 optimizations.
Diffstat (limited to 'examples/rlgl_hello_triangle/main.lua')
-rw-r--r--examples/rlgl_hello_triangle/main.lua8
1 files changed, 4 insertions, 4 deletions
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 )