Page 1 of 1

DirectX 9 ID3DXEFFECT for PB

Posted: Mon Dec 27, 2010 3:10 pm
by Roman
Greetings to all!
Please help, I can understand with ID3DXEFFECT.

*Effect \SetMatrix ("mat_World_View_Proj",mat_World_View_Proj)
Here an error: “mat_World_View_Proj” the line is inadmissible, if mat_World_View_Proj that the result is not present.
Prompt how to resolve this problem.

P.S.
Excuse for my English.

Re: DirectX 9 ID3DXEFFECT for PB

Posted: Mon Dec 27, 2010 3:37 pm
by IdeasVacuum
Hello Roman

You need to post the tiniest code snippet possible that reproduces the problem, then someone might be able to help.

Re: DirectX 9 ID3DXEFFECT for PB

Posted: Mon Dec 27, 2010 5:48 pm
by Roman
Here a code:
*effect. ID3DXEffect
D3DXCreateEffectFromFile (*D3DDevice, "ald_Parallax_Mapping.fx", 0,0,0,0, *effect, 0)

; Render_Effect
mat_World_View_Proj. D3DXMATRIX
D3DXMatrixIdentity (mat_World_View_Proj)
hr =*effect \SetMatrix (mat_World_View_Proj, mat_World_View_Proj)
At this stage an error hr.

On C ++ the first parameter a line, and the second a matrix - but PB differently.
If I shall enter a line in the first parameter SetMatrix there is a mistake{an error}.
And if to enter simply «mat_World_View_Proj» that a hr-mistake.
How to me correctly to make to install *effect \SetMatrix (mat_World_View_Proj, mat_World_View_Proj)?

Re: DirectX 9 ID3DXEFFECT for PB

Posted: Mon Dec 27, 2010 8:46 pm
by Rook Zimbabwe
hr =*effect \SetMatrix (mat_World_View_Proj, mat_World_View_Proj)
At this stage an error hr.
not enough to go on... assuming you have set up *effect correctly? and that "effect" can be used as an ID?

A bit more code needed... this isn't Texas Hold'em here! 8)

Re: DirectX 9 ID3DXEFFECT for PB

Posted: Tue Dec 28, 2010 1:09 pm
by Fluid Byte
We need code that can be executed :!:

Re: DirectX 9 ID3DXEFFECT for PB

Posted: Tue Dec 28, 2010 3:21 pm
by Roman
Thanks for answers!!!
I have understood.

In this code all OK:
mat_World_View_Proj. D3DXMATRIX
D3DXMatrixIdentity (mat_World_View_Proj)
hr = *effect\SetMatrix (*effect\GetParameterByName (0, “mat_World_View_Proj”), mat_World_View_Proj)

*effect\GetParameterByName (0, “mat_World_View_Proj”); we Receive descriptors of parameters
Now all works as it is necessary.