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 / GetRenderer Command?

Author
Message
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 13th Aug 2019 20:28
Is there a command that returns if you are using OpenGL or Vulkan? GetRenderer?

CounterParry
DarkDIRE RPG
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 13th Aug 2019 20:37 Edited at: 13th Aug 2019 20:38
Not currently, but it is needed and has been requested. We certainly need a global way to determine what render path AGKS selects in addition to being able to set it ourselves. A 'software' type render mode has also been requested for those of us interested in writing server apps that don't require 3D hardware/drivers and only need to display text. My request was long these lines:

SetRenderMode(#) where # would be 0 = software, 1 = OpenGL, 2 = Vulkan
return=GetRenderMode() where the return would be the same, 0 = software, 1 = OpenGL, 2 = Vulkan
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Aug 2019 00:09
SetRenderMode(#) would imply that you could change the renderer at runtime where as the #renderer is implemented at compile time (I think)
It would be nice to have a GetRenderMode() although you could implement that yourself by

#define RENDER_MODE "Basic"

#renderer RENDER_MODE

if RENDER_MODE = "Basic"
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 14th Aug 2019 01:14
I don't mind a compile directive for setting the render mode, that works also so long as it's set before anything else is done.

But if you define (set) the 'RENDER_MODE' value before initializing it, how does that solve the problem of detecting what AGKS may default to for its render mode based on its automated detection and initialization system? The issue is a code-side awareness of what mode AGKS defaults to.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Aug 2019 02:44 Edited at: 14th Aug 2019 03:21
True. You would have to change it for different builds

EDIT: This is very specky but you could use RenderToImage() to render the screen to an image. The Basic renderer will render the clearcolor() to the image and the Advanced renderer will render black (or maybe transparent, i'm not sure)
NOTE: It is very likely that his will change in the coming releases but maybe when they fix the render to image they'll add a GetRendered() function
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 14th Aug 2019 16:45
We are definitely on the same page. I am currently trying to convert a tier 2 AppGameKit Studio into a console-based program for a game server.

CounterParry
DarkDIRE RPG
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 16th Aug 2019 21:00
@Parry, there should be a template for console programs in C++ apps folder, or are you converting an existing app from normal screen output to console output?
13/0

Login to post a reply

Server time is: 2024-03-29 09:18:12
Your offset time is: 2024-03-29 09:18:12