Open qarasina opened 4 years ago
Thanks for the report! :+1:
Does the following work? I'm getting 30 FPS...
const r = require('raylib')
// Initialization
//--------------------------------------------------------------------------------------
var screenWidth = 800
var screenHeight = 450
r.InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window")
r.SetTargetFPS(30)
//--------------------------------------------------------------------------------------
// Main game loop
while (!r.WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Update your variables here
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
r.BeginDrawing()
r.ClearBackground(r.RAYWHITE)
r.DrawText("Congrats! You created your first window!", 190, 200, 20, r.LIGHTGRAY)
r.EndDrawing()
console.log('FPS:' + r.GetFPS())
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
r.CloseWindow() // Close window and OpenGL context
//--------------------------------------------------------------------------------------
Yes but it not work with r.setTargetFps(120)
That must be a thing with GLFW or raylib. Very strange. Does the C++ one work?
The C version work :)
Does your monitor support it? Perhaps vsync is taking over.
The targetfps function doesn't work my fps are blocked at 60