Page 1 of 1

FFGL hostTime initialization

Posted: Fri Mar 31, 2023 23:02
by marcusren
Hello,
I've been building FFGL plugins for Resolume using the FFGL SDK on GitHub and have noticed that the "hostTime" property of plugin instances is not initialized for the first one or two iterations of "CFFGLPlugin:ProcessOpenGL". Here is the output I see when logging "hostTime":

hostTime: -6.27744e+66
hostTime: -6.27744e+66
hostTime: 57945.2
hostTime: 58008
hostTime: 58101.1
hostTime: 58192.7
hostTime: 58240.6
hostTime: 58278.8

This occurs on both Windows and OSX. Is this expected behavior? It seems strange to me that "ProcessOpenGL" would be called without a valid "hostTime" since "hostTime" is important in driving animations performed during "ProcessOpenGL".

I'm currently able to work around this by testing for "hostTime > 0" but I'm not sure if that's the recommended solution.

Thanks in advance for your help