DirectX 9 ID3DXEFFECT for PB

Advanced game related topics
Roman
New User
New User
Posts: 5
Joined: Sun Sep 19, 2010 12:34 pm

DirectX 9 ID3DXEFFECT for PB

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: DirectX 9 ID3DXEFFECT for PB

Post by IdeasVacuum »

Hello Roman

You need to post the tiniest code snippet possible that reproduces the problem, then someone might be able to help.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Roman
New User
New User
Posts: 5
Joined: Sun Sep 19, 2010 12:34 pm

Re: DirectX 9 ID3DXEFFECT for PB

Post 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)?
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: DirectX 9 ID3DXEFFECT for PB

Post 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)
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: DirectX 9 ID3DXEFFECT for PB

Post by Fluid Byte »

We need code that can be executed :!:
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Roman
New User
New User
Posts: 5
Joined: Sun Sep 19, 2010 12:34 pm

Re: DirectX 9 ID3DXEFFECT for PB

Post 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.
Post Reply