FFGL 2 SDK

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
User avatar
subpixel
Hasn't felt like this about software in a long time
Posts: 142
Joined: Thu Jun 05, 2014 09:32
Location: Melbourne, AU

Re: FFGL 2 SDK

Post by subpixel » Sun Sep 01, 2019 09:21

Menno wrote:
Thu Aug 29, 2019 10:51
About the linked list, are you talking about the params in the CFFGLPluginManager class? This list has already been replaced on the repo's master branch.
I see the commit on 31 July.
https://github.com/resolume/ffgl/commit ... 6fbf9f9e94

I see that ParamInfo::ID is still being used; I removed it and just use the vector index.

PluginManager.cpp

Code: Select all

ParamBase* PluginManager::FindParam( FFUInt32 index )
{
	return ( index < params.size() ) ? params[ index ] : nullptr;
}
Also, the SetParamInfo, SetBufferParamInfo, SetOptionParamInfo and SetParamElementInfo methods have been replaced by:

Code: Select all

void PluginManager::AddParam( ParamBase* param )
{
	params.push_back( param );
}
Menno wrote:
Thu Aug 29, 2019 10:51
For option parameters, FFGL treats values as the value for the option that's being set. See the Particles example's PID_MAX_AGE parameter. ffgl quickstart however, fills in option element values asif they're an index to the option. This has as a result that the ParamOption's GetValue will return when index, you need to call GetRealValue instead. Plugin::SendParams doesn't seem to respect option's real values, is that maybe the cause of your issue?
I had a closer look at what was going on in my code. I had earlier supposed Resolume would send the selected element value (not the index), however coded for it sending the index; when an element value larger than the number of options was received, I was catching that as an unexpected value and setting the index to zero. I've fixed it now by having PluginManager::GetParamElementDefault simply return the element index for FF_TYPE_OPTION params (I don't store the index values anywhere).

-spxl

Post Reply