Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Jvlonden

Member Since 20 Jun 2013
Offline Last Active Feb 09 2014 08:03 AM

Posts I've Made

In Topic: Passing an CComPtr<IDirect3DDevice9> to another class via its constru...

20 June 2013 - 10:00 AM

So if this is my class:

class MyClass
{
private:
	CComPtr<IDirect3DDevice9> d3ddev;

public:
	MyClass(IDirect3DDevice9 * _d3ddev)
	{
		this->d3ddev = _d3ddev;
	} 
};

And I would create an instance of it like this:

CComPtr<IDirect3DDevice9> d3ddev;

InitDevice()
{
    // d3ddev gets inititialized here
}

SomeFunction()
{
    InitDevice();
    MyClass myclass1(d3ddev);
}

Then that would be fine?


PARTNERS