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 choose Vulkan renderer in Tier 2?

Author
Message
Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 19th Nov 2023 11:39
How to choose Vulkan renderer in Tier 2?
I noticed that in Tier2 there is no such thing as #renderer "Advanced"
Aidan
User Banned
Posted: 19th Nov 2023 14:52 Edited at: 19th Nov 2023 14:53
Can't we use

AGk::#renderer "Advanced"

Putting AGk:: before using AGk commands in tier 2
qweQua
1
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 19th Nov 2023 16:19
No, there is no agk::#renderer as # is an illegal character for function (or class method in this case) names in c++.

In core.cpp there is a line (although i don't know exactly where) where the renderer is being set up. (I remember seeing it while seaching for such an option.

If you use studio, the renderer is set to prefer best by default (Vulkan where available).

I think if you CTRL-F prefer best, vulkan, opengl or something you should be able to find the place where you can force vulkan (in core.cpp).
qweQua
1
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 19th Nov 2023 16:26
Found it.

Line 316 in the linux template, Core.cpp, in the main function (not sure about the other platforms) find:

agk::InitGraphics( &data, AGK_RENDERER_MODE_PREFER_BEST, 0 );

And change to the render mode you want
(ADVANCED, LEGACY, etc.)
Aidan
User Banned
Posted: 19th Nov 2023 16:37
If we force it like that and send apps to market, if the devices don't have vulkhan graphic cards then apps won't work or have undesired effects. Unless it automatically reverts back to opengl (supported by all cards) of vulkhan not found.



This will need heavily testing on devices that doesn't support vulkhan

It will work on ours but may not others

Just be weary of that scenario

Alex_Peres
AGK Master
14
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 19th Nov 2023 16:43
Quote: "agk::InitGraphics( &data, AGK_RENDERER_MODE_PREFER_BEST, 0 );"


Thank you so much! I'll try it.
qweQua
1
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 19th Nov 2023 16:50
Keep in mind you have to change the line in core.cpp, not add it to your game.cpp

Login to post a reply

Server time is: 2024-02-26 20:46:31
Your offset time is: 2024-02-26 20:46:31