What I'm trying to do,is get all the valid techniques in an effect file.Now I know you can get them 1 by 1 like this:
D3DXHANDLE hTech;
anEffect->FindNextValidTechnique(NULL,&hTech);
What I want to know,is if DirectX keeps an internal pointer to the current technique in that effect,or if it just checks to see what it's the current technique used in hTech,and just increment it.
So finally,could I do this?
D3DXHANDLE hTech[15];
for(int i = 0;i<15;i++){
anEffect->FindNextValidTechnique(NULL,hTech);
}
You can see that all I'm trying to do is just extract all the techniques that are in that effect file,and put each one of them in my array.
But is that possible? And if so,where is that internal pointer kept?
And the other problem:
This will probably sound dumb,but can I do this?
aneEffect->SetTexture("text0",(LPDIRECT3DBASETEXTURE9)tex->pData);
tex is a structure that contains some details about texture,like it's name etc.But it also contains the raw data of a texture,that is kept in a void*.In this case,pData is the pointer to void*.
So is the stuff I'm doing there,casting it to a (LPDIRECT3DBASETEXTURE9) correct? I can't compile now,I just want to know if it will throw errors and why.
Edited by noatom, 10 January 2013 - 11:27 AM.






