summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/2D_camera/main.lua1
-rw-r--r--examples/dungeon_crawler/main.lua1
-rw-r--r--examples/gui/main.lua1
-rw-r--r--examples/heightmap/main.lua1
-rw-r--r--examples/image_draw/main.lua1
-rw-r--r--examples/iqm_test/main.lua1
-rw-r--r--examples/lightmap/main.lua1
-rw-r--r--examples/pixelated/main.lua1
-rw-r--r--examples/platformer/main.lua2
-rw-r--r--examples/point_triangle_collision/main.lua3
-rw-r--r--examples/pong/main.lua1
-rw-r--r--examples/ray/main.lua1
-rw-r--r--examples/resources/lib/utillib.lua2
-rw-r--r--examples/shaders/main.lua1
-rw-r--r--examples/snake/main.lua1
-rw-r--r--examples/waving_cubes/main.lua1
-rw-r--r--examples/window/main.lua1
17 files changed, 17 insertions, 4 deletions
diff --git a/examples/2D_camera/main.lua b/examples/2D_camera/main.lua
index 23128dc..54d3ec6 100644
--- a/examples/2D_camera/main.lua
+++ b/examples/2D_camera/main.lua
@@ -14,6 +14,7 @@ function init()
local winSize = RL_GetWindowSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
RL_SetWindowTitle( "Camera 2D" )
diff --git a/examples/dungeon_crawler/main.lua b/examples/dungeon_crawler/main.lua
index 03f499b..070eb97 100644
--- a/examples/dungeon_crawler/main.lua
+++ b/examples/dungeon_crawler/main.lua
@@ -74,6 +74,7 @@ function init()
RL_SetExitKey( KEY_ESCAPE )
-- framebuffer = RL_LoadRenderTexture( res )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
texture = RL_LoadTexture( RL_GetBasePath().."../resources/images/tiles.png" )
diff --git a/examples/gui/main.lua b/examples/gui/main.lua
index 4c84af8..e412201 100644
--- a/examples/gui/main.lua
+++ b/examples/gui/main.lua
@@ -28,6 +28,7 @@ function init()
RL_GuiSetFont( 0 )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
end
diff --git a/examples/heightmap/main.lua b/examples/heightmap/main.lua
index 3cae3e4..4b5e70e 100644
--- a/examples/heightmap/main.lua
+++ b/examples/heightmap/main.lua
@@ -24,6 +24,7 @@ function init()
local winSize = RL_GetWindowSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
camera = RL_CreateCamera3D()
diff --git a/examples/image_draw/main.lua b/examples/image_draw/main.lua
index ee9757c..7d5cb90 100644
--- a/examples/image_draw/main.lua
+++ b/examples/image_draw/main.lua
@@ -11,6 +11,7 @@ function init()
local winSize = RL_GetWindowSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
image = RL_GenImageColor( winSize[1], winSize[2], WHITE )
-- Test changing working directory.
diff --git a/examples/iqm_test/main.lua b/examples/iqm_test/main.lua
index 1420f92..105af12 100644
--- a/examples/iqm_test/main.lua
+++ b/examples/iqm_test/main.lua
@@ -18,6 +18,7 @@ function init()
local winSize = RL_GetWindowSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
camera = RL_CreateCamera3D()
RL_SetCamera3DPosition( camera, { 0, 2, 4 } )
diff --git a/examples/lightmap/main.lua b/examples/lightmap/main.lua
index 251b700..8f8038e 100644
--- a/examples/lightmap/main.lua
+++ b/examples/lightmap/main.lua
@@ -16,6 +16,7 @@ function init()
local winSize = RL_GetWindowSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
camera = RL_CreateCamera3D()
diff --git a/examples/pixelated/main.lua b/examples/pixelated/main.lua
index 24ba913..d130c1c 100644
--- a/examples/pixelated/main.lua
+++ b/examples/pixelated/main.lua
@@ -12,6 +12,7 @@ local winSize = { res[1] * scale, res[2] * scale }
function init()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
RL_SetWindowSize( winSize )
tex = RL_LoadTexture( RL_GetBasePath().."../resources/images/cat.png" )
diff --git a/examples/platformer/main.lua b/examples/platformer/main.lua
index 2c954be..5bfa6ab 100644
--- a/examples/platformer/main.lua
+++ b/examples/platformer/main.lua
@@ -90,9 +90,9 @@ function init()
local monitorPos = Vec2:new( RL_GetMonitorPosition( monitor ) )
local monitorSize = Vec2:new( RL_GetMonitorSize( monitor ) )
- RL_SetConfigFlags( FLAG_VSYNC_HINT )
RL_SetWindowTitle( "Platformer" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowSize( winSize )
RL_SetWindowPosition( { monitorPos.x + monitorSize.x / 2 - winSize.x / 2, monitorPos.y + monitorSize.y / 2 - winSize.y / 2 } )
diff --git a/examples/point_triangle_collision/main.lua b/examples/point_triangle_collision/main.lua
index 96c864d..0a7c1ea 100644
--- a/examples/point_triangle_collision/main.lua
+++ b/examples/point_triangle_collision/main.lua
@@ -34,9 +34,8 @@ function init()
local mSize = RL_GetMonitorSize( monitor )
local winSize = { 1920, 1080 }
- RL_SetConfigFlags( FLAG_VSYNC_HINT )
-
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
RL_SetWindowSize( winSize )
camera = RL_CreateCamera3D()
diff --git a/examples/pong/main.lua b/examples/pong/main.lua
index b3f3f99..7de5517 100644
--- a/examples/pong/main.lua
+++ b/examples/pong/main.lua
@@ -53,6 +53,7 @@ function init()
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowSize( winSize )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
RL_SetWindowTitle( "Pong" )
diff --git a/examples/ray/main.lua b/examples/ray/main.lua
index ed74f6e..248cec6 100644
--- a/examples/ray/main.lua
+++ b/examples/ray/main.lua
@@ -9,6 +9,7 @@ local function setupWindow()
local winSize = RL_GetWindowSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
end
diff --git a/examples/resources/lib/utillib.lua b/examples/resources/lib/utillib.lua
index 66916fe..8d3ce9e 100644
--- a/examples/resources/lib/utillib.lua
+++ b/examples/resources/lib/utillib.lua
@@ -13,7 +13,7 @@ function utillib.deepCopy( orig )
copy = {}
for origKey, origValue in next, orig, nil do
- -- If object has clone method use that. Mainly for vector libraries.
+ -- If object has clone method, use that.
if type( origValue ) == "table" and type( origValue.clone ) == "function" then
copy[ utillib.deepCopy( origKey ) ] = orig_value:clone()
else
diff --git a/examples/shaders/main.lua b/examples/shaders/main.lua
index eea9344..f603a5d 100644
--- a/examples/shaders/main.lua
+++ b/examples/shaders/main.lua
@@ -14,6 +14,7 @@ function init()
local winSize = RL_GetWindowSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
texture = RL_LoadTexture( RL_GetBasePath().."../resources/images/cat.png" )
diff --git a/examples/snake/main.lua b/examples/snake/main.lua
index d6e4fa5..dd752e4 100644
--- a/examples/snake/main.lua
+++ b/examples/snake/main.lua
@@ -66,6 +66,7 @@ end
function init()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowSize( winSize )
RL_SetWindowPosition( { monitorPos[1] + monitorSize[1] / 2 - winSize[1] / 2, monitorPos[2] + monitorSize[2] / 2 - winSize[2] / 2 } )
RL_SetWindowTitle( "Snake" )
diff --git a/examples/waving_cubes/main.lua b/examples/waving_cubes/main.lua
index 90e7b5d..faf4a9f 100644
--- a/examples/waving_cubes/main.lua
+++ b/examples/waving_cubes/main.lua
@@ -17,6 +17,7 @@ function init()
RL_SetWindowTitle( "Waving cubes" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
camera = RL_CreateCamera3D()
diff --git a/examples/window/main.lua b/examples/window/main.lua
index 44d9fa7..7ddf828 100644
--- a/examples/window/main.lua
+++ b/examples/window/main.lua
@@ -5,6 +5,7 @@ local text = "Congrats! You created your first window!"
function init()
RL_SetWindowTitle( "First window" )
+ RL_SetWindowState( FLAG_VSYNC_HINT )
end
function process( delta )