M
Michael Sgier
Hi folks
class X
{
private:
CTexture *modelTex; // texture data
}
CTexture* X::Load()
{
return modelTex;
}
program doing other things and then returning and calling:
anotherfunctionofclassX{
glBindTexture(GL_TEXTURE_2D, modelTex->texID);
}
here modelTex doesn't produce an error but it's empty. Why I thought
that in classes you don't need to pass vars. but even after changing Load()
to return a pointer to CTexture, when I return to the class modelTex is
empty. What has happened to modelTex? What do i need to do?
THANKS and regards
Michael
class X
{
private:
CTexture *modelTex; // texture data
}
CTexture* X::Load()
{
return modelTex;
}
program doing other things and then returning and calling:
anotherfunctionofclassX{
glBindTexture(GL_TEXTURE_2D, modelTex->texID);
}
here modelTex doesn't produce an error but it's empty. Why I thought
that in classes you don't need to pass vars. but even after changing Load()
to return a pointer to CTexture, when I return to the class modelTex is
empty. What has happened to modelTex? What do i need to do?
THANKS and regards
Michael