in a nutshell,
performance. assuming you have a Vulkan machine, run this:
// Project: VulkanVsOpenGL
// Created: 21-11-28
// show all errors
SetErrorMode(2)
#Renderer "Advanced" //Vulkan
//#Renderer "Basic" //OpenGL
// set window properties
SetWindowTitle( "VulkanVsOpenGL" )
SetWindowSize( 1280,720, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1280,720 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 0, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
Sphere = CreateObjectSphere(10,20,20)
SetCameraPosition(1,0,0,-1000)
SetCameraLookAt(1,0,0,0,0)
do
If ScreenFPS() > 60
This = CloneObject(Sphere)
SetObjectPosition(This,Random(0,1500)-750,Random(0,1000)-500,0)
SetObjectColor(This,Random(0,255),Random(0,255),Random(0,255),255)
Endif
Print( STR(GetPolygonsDrawn()) + " polys @ " + STR(ScreenFPS(),0) + " FPS")
Print( GetRendererName() )
Sync()
loop
on my modest laptop, i can render ~2.3M polys @ 60 FPS vs ~1.5M under OpenGL.
swap those 2 lines near the top to see for yourself:
#Renderer "Advanced" //Vulkan
//#Renderer "Basic" //OpenGL
if your machine does not support Vulkan, the app will simply close when running
#Renderer "Advanced"
for more, see
Vulkan & OpenGL under
Core in the Studio Help docs.