Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / How to force OpenGL?

Author
Message
psychoanima
5
Years of Service
User Offline
Joined: 19th Jun 2018
Location:
Posted: 25th Jul 2019 00:15
Since I already start developing my game for Android on Classic version, I have open gl shaders so when I run (not broadcast) test on Studio version I don't have 3D objects visible. How to override Vulkan and use OpenGL instead?




SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 25th Jul 2019 01:25 Edited at: 25th Jul 2019 01:26
I don't think the option is available yet, but it has been requested and TGC has indicated they could add the ability to specify the render path: https://github.com/TheGameCreators/AGK-Studio/issues/372

Developers certainly need a way to provide different rendering paths to their customers considering the benefits and limitations of each. Requests have also been made to provide a 'software' rendering mode displaying text only so server apps can be developed (Tier1) without the need for 3D graphics hardware. A built in command option would be best, such as:

SetRenderingMode(Num)

Where 'Num' could be 0 for software/text only, 1 for OpenGL, or 2 for Vulkan. And even if the bound display device had to be reset to activate the required device, a command option could still work. That is, if Studio dropped to OpenGL or software because required hardware/drivers were not detected (dropping to OpenGL being already automatic), the manual command mode would enable the new render path and device activation on demand as needed. The developer would just need to be aware that they would always have to decrease the render mode from whatever Studio started at (you could go from default Vulkan to OpenGL, but not the other way around) and have the command at the beginning of their game/app before they did anything else.
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 25th Jul 2019 18:24
Forgot to mention that we'd also need a way to determine what rendering mode our game is running in so we can know how to handle any required/desired mode changes before we select a different mode. So:

Return=GetRenderMode()

Would tell us 0 = software/text only, 1 = OpenGL, or 2 = Vulkan with the same numbers for mode type.
psychoanima
5
Years of Service
User Offline
Joined: 19th Jun 2018
Location:
Posted: 26th Jul 2019 01:25
okay, so models I made with OpenGL shaders I would not be able to use in Studio version?
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 26th Jul 2019 02:20
There is a shader compiler that works to port older OpenGL format shaders over to the SPIR-V format of Vulkan. The shaders I use mostly worked, some needed some formatting changes to accommodate the internal requirements of Studio's compiler (and that may change in the future). There are also inherent differences within Vulkan that you'll need to account for (for example, clip spacing orientation if you use your own shadow shader). I'd recommend keeping watch for updates that indicate changes/improvements to the shader system. Currently, things work pretty well for me and I'm using a pretty wide array of shaders.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 27th Jul 2019 18:13
SFSW, I've just tried Studio today and the shaders failed as AppGameKit no longer seems to pass in the agk_time or vex3 position data to the shader......the agk_time I actually moved away from and just forgot to take out the attribute line, but position I use extensively.

Did you have issues with position?
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 27th Jul 2019 18:25
No, but there are some structural limitations/requirements in the current shader compiler. See my reply in your other thread on the subject.

Login to post a reply

Server time is: 2024-04-18 10:41:19
Your offset time is: 2024-04-18 10:41:19