I seem to have a problem with assigning either display lists or textures in a class.
I have a class variable relating to a list or a texture which is instanciated when the object is created (for example a mesh object)
But when I use GenLists or whatever command is used to return a number in a method (say for example GetTexture which assigns a texture to the object) (GLuint) it returns rubbish , I know there is nothing wrong with the code itself as I have had to transfer it to Main() where it works fine.
What I am having to do is use GenList or the get texture command in Main() and pass the GLuint back to the class.
when researching, i use similar methods.
a sphere class, for example, will hold informations with display lists and texture objects.
i got no troubles so far.
rubbish… makes me think about a recent problem i had with multithreading: is your application single-threaded ?
I assume it is single threaded as i am using windows 98.
My method is public and my variable that holds the pointer is protected. Just a thought, would I have to declare my class as public? at present I call it: