Hi.
I`m using AppGameKit Studio version 2020.07.28 from Steam on macOS Catalina 10.15.6
I`m trying to port an old project I made in Classic that runs fine on Windows, Android and HTML5 to macOS and iOS using Studio, but if I set the renderer to Vulkan, I get a blank screen on both iOS and macOS.
This is the example code that reproduce the problem for me:
#renderer "Advanced"
global windowWidth as integer = 1024
global windowHeight as integer = 768
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "bugtest" )
SetWindowSize( windowWidth, windowHeight, 0)
SetWindowAllowResize( 0 )
// set display properties
SetVirtualResolution( windowWidth, windowHeight )
SetOrientationAllowed( 0, 0, 1, 0 )
SetSyncRate( 60, 0 )
SetScissor( GetScreenBoundsLeft(),GetScreenBoundsTop(),GetScreenBoundsRight(),GetScreenBoundsBottom() )
text = CreateText("Hello World")
SetTextSize(text, 100)
SetTextPosition(text, 300, 100)
do
Print( ScreenFPS() )
Sync()
loop
I have identified the specific lines that cause the problem:
SetWindowSize( windowWidth, windowHeight, 0)
SetScissor( GetScreenBoundsLeft(),GetScreenBoundsTop(),GetScreenBoundsRight(),GetScreenBoundsBottom() )
If I comment out any of this two lines, it is solves the problem.
If I switch to Basic (OpenGL) rendering, it is also solves the problem.
I don't know if it a bug or if I did something wrong, that SetScissor() command is suspicious to me, maybe I was using it wrong, it was more than a year ago last time I used AppGameKit and I can not remember why I did what I did, I`m guessing it was necessary to make it fit my old Android device, anyhow, I figured it is maybe worth sharing and let you decide if it a bug or not optimal use of any of the commands.
Thanks.