Skip to main content
added 181 characters in body
Source Link
Pablo Ariel
  • 1.4k
  • 8
  • 13

But are you creating the cube instance somewhere? such as cube1 = new Cube() and there could be another device variable defined with the same name, such as a protected member of GameObject?

Try removing "static" from static ID3D10Device* device; and see if that fixes the problem. Not sure about this though

Like this:

void Initialise(HWND hWnd)
{   
    cube1 = new Cube();
    initD3D(hWnd);
    init_pipeline();
    test();
    cube1->Init();

// Init(); }

But are you creating the cube instance somewhere? such as cube1 = new Cube() and there could be another device variable defined with the same name, such as a protected member of GameObject?

Try removing "static" from static ID3D10Device* device; and see if that fixes the problem. Not sure about this though

But are you creating the cube instance somewhere? such as cube1 = new Cube() and there could be another device variable defined with the same name, such as a protected member of GameObject?

Try removing "static" from static ID3D10Device* device; and see if that fixes the problem. Not sure about this though

Like this:

void Initialise(HWND hWnd)
{   
    cube1 = new Cube();
    initD3D(hWnd);
    init_pipeline();
    test();
    cube1->Init();

// Init(); }

Source Link
Pablo Ariel
  • 1.4k
  • 8
  • 13

But are you creating the cube instance somewhere? such as cube1 = new Cube() and there could be another device variable defined with the same name, such as a protected member of GameObject?

Try removing "static" from static ID3D10Device* device; and see if that fixes the problem. Not sure about this though