So how do you do that, like in the function GEtBuffer()?
Printable View
So how do you do that, like in the function GEtBuffer()?
Be more specific. What variable and how do we change it (that is, in what way do we want to modify it)?
Is it a global variable, a local variable, a static variable? Is it a variable that we return? Is it a parameter?
Examples? Code? Something to show what you mean?
Well this is what I mean
Code://At the beggining pBackBuffer is NULL
ID3D10Texture2d pBackBuffer = NULL;
GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&pBackBuffer);
//At the end pBackBuffer has a value
Right, well there are two ways, of which I will demonstrate only one:
Code:void foo(int& v) { v = 10; }
// Call as
int x;
foo(x);
// x is now 10.
I am not sure from this or some of your other posts just how much experience you have in programming? It seems you may be 'diving in' and taking something very complicated on from the getGo?Quote:
//At the beggining pBackBuffer is NULL
ID3D10Texture2d pBackBuffer = NULL;
GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&pBackBuffer);
//At the end pBackBuffer has a value
One would assume that the GetBuffer returns a texture surface that uses pointers internally..? or or some similar operation, the programmer attempts to NULL the type before using it.
And if you actually mean 'how does a function change a value' , as in Elysia's example...well you need to study a little before hoping to create any games...