[GEM-dev] [glsl_program] getVariables() prob
james tittle
tigital at mac.com
Mon Feb 27 16:55:14 CET 2006
...just throwing this out to anyone: I've come across a problem that
has me stumped...it occurs when I'm working on a shader and change
the number of uniform variables between loadings, such that re-
linking causes a crash at:
m_symname[i]=gensym(m_name[i]);
...this is in a loop that grabs results of active uniform variables,
and it seems we're not cleaning up correctly either m_name[i] or
m_symname[i]...I've also noticed that sometimes m_name[0] will not
correctly be filled in, and therefore it doesn't show up in printInfo
()...
...I tried something like the following for m_name, m_symname, and
m_params, but it's not enough:
if (m_name)
{
for (int i = 0; i < m_uniformCount; i++)
free(m_name[i]);
free(m_name);
}
...also, in getVariables() I've rearranged the order of free-ing
variables so that it occurs before we query the gl object parameters
(ie. before we reset m_uniformCount to it's new value), but this
wasn't the full answer...any other ideas?
jamie
More information about the GEM-dev
mailing list