M
Manuel
Hi.
I've a code like this:
------------------------------------
pngInfo textInfo;
texture = pngBind("foo.png", PNG_NOMIPMAP, PNG_ALPHA, &texInfo,
GL_CLAMP, GL_NEAREST, GL_LINEAR);
------------------------------------
where pngBind need a reference to textInfo.
Now I want include this code into a function that take as argument a
reference to textInfo. I'm not sure about how to write this function.
1)
void myFunction( pngInfo &textInfo)
{
texture = pngBind("foo.png", PNG_NOMIPMAP, PNG_ALPHA, &texInfo,
GL_CLAMP, GL_NEAREST, GL_LINEAR);
}
or
2)
void myFunction( pngInfo &textInfo)
{
texture = pngBind("foo.png", PNG_NOMIPMAP, PNG_ALPHA, texInfo, GL_CLAMP,
GL_NEAREST, GL_LINEAR);
}
In case 1 it seem a sort of reference of reference...in case 2...not
sure what I've written...
Regards,
Manuel
I've a code like this:
------------------------------------
pngInfo textInfo;
texture = pngBind("foo.png", PNG_NOMIPMAP, PNG_ALPHA, &texInfo,
GL_CLAMP, GL_NEAREST, GL_LINEAR);
------------------------------------
where pngBind need a reference to textInfo.
Now I want include this code into a function that take as argument a
reference to textInfo. I'm not sure about how to write this function.
1)
void myFunction( pngInfo &textInfo)
{
texture = pngBind("foo.png", PNG_NOMIPMAP, PNG_ALPHA, &texInfo,
GL_CLAMP, GL_NEAREST, GL_LINEAR);
}
or
2)
void myFunction( pngInfo &textInfo)
{
texture = pngBind("foo.png", PNG_NOMIPMAP, PNG_ALPHA, texInfo, GL_CLAMP,
GL_NEAREST, GL_LINEAR);
}
In case 1 it seem a sort of reference of reference...in case 2...not
sure what I've written...
Regards,
Manuel