Hi there,
Working through Beginning OpenGL Game Programming and I want to add a TGA mouse cursor. Most of it is sorted, but there's a problem I'm having.
winmain.cpp has the mouseX and mouseY variables. I have taken these out of the winmain.cpp file and put them in a header called mouse.h which I have included at the top of the file. All hunky dory.
Now, I want to use the same mouseX and mouseY variables in another file. Can I do this? Do I need to have a separate routine to find the mouse's X and Y values in CGfxOpenGL.cpp? Using mouse.h gives me this:
error: 'mouseX' was not declared in this scope
error: 'mouseY' was not declared in this scope
Not sure what to do here guys?
Working through Beginning OpenGL Game Programming and I want to add a TGA mouse cursor. Most of it is sorted, but there's a problem I'm having.
winmain.cpp has the mouseX and mouseY variables. I have taken these out of the winmain.cpp file and put them in a header called mouse.h which I have included at the top of the file. All hunky dory.
Now, I want to use the same mouseX and mouseY variables in another file. Can I do this? Do I need to have a separate routine to find the mouse's X and Y values in CGfxOpenGL.cpp? Using mouse.h gives me this:
error: 'mouseX' was not declared in this scope
error: 'mouseY' was not declared in this scope
Not sure what to do here guys?
