I have:
class Game...
class D3DGraphics...
I have a variable of type D3DGraphics called gfx declared in my Game class.
I make another few classes:
class Font...
class Viewport...
I make them both friends of D3DGraphics and declare variables inside D3DGraphics class:
Font font;
Viewport viewport;
Finally in my D3DGraphics I have a variable made public:
LPDIRECT3DDEVICE9 d3dDevice;
my font class cannot see d3dDevice even though it is a friend of D3DGraphics?
Why is that?
EDIT::// Have now changed code around to push pointers through to outside classes: https://github.com/jimmyt1988/TheGame/tree/master/TheGame
- windows.cpp // where I create my game object and pass my hWnd through.
- Game.cpp / Game.h
- Font.cpp / Font.h
- D3DGraphics.cpp / D3DGraphics.h
- Viewport.cpp / Viewport.h