SetIntArray doesn't work :(

Started by
8 comments, last by Evil Steve 14 years, 5 months ago
Hey :D I'm having some troubles using ID3DXConstantTable::SetIntArray. All the other methods to set values in the constant table work, but neither SetIntArray or SetFloatArray do. Does someone know why ? THANKS!
Advertisement
Define "doesn't work". Does it crash? If so, with what error? Does it return an error code? If so, what error? Does it not set the variable correctly? Does it change the value at all? How are you verifying this? Do the debug runtimes say anything?
Quote:Original post by Evil Steve
Define "doesn't work". Does it crash? If so, with what error? Does it return an error code? If so, what error? Does it not set the variable correctly? Does it change the value at all? How are you verifying this? Do the debug runtimes say anything?


Sorry, you're right ;)

It returns a INVALID CALL error.

I use it in this way:
HRESULT r = constantTable->SetIntArray(m_d3ddevice, name, v, count);

'v' is an int array (allocated..), count is an int variable that contains the number of items.

As for the shader, the values of the array clearly appear to be wrong (actually, they are not set).

The DX debug doesn't say nothing when the method is called.

Don't have any clue why :°(

Quote:Original post by NiGoea
It returns a INVALID CALL error.

[snip]

The DX debug doesn't say nothing when the method is called.
Do you get any D3DX debug output? Is your debug output level set to maximum in the DirectX control panel, and are you linking to d3dx9d.lib? As far as I know, if a D3D or D3DX function fails, you'll always get debug output saying why.

Are you sure "count" and "v" are both valid?
Quote:Original post by Evil Steve
Is your debug output level set to maximum in the DirectX control panel, and are you linking to d3dx9d.lib?


Yes.

Quote:
As far as I know, if a D3D or D3DX function fails, you'll always get debug output saying why.


It fails, but says nothing to the debug output window.

Quote:
Are you sure "count" and "v" are both valid?


Both are valid for sure. Count is just an int, and 'v' points to the correct area, i checked it with the watch window.

I will try something again... anyway, thanks !
Do you get any debug output at all? At the very least you should get a line saying something like "D3DX: Using SSE2 optimizations". If you don't, you're not using the debug runtimes.

What is the value of "count"?
AS you can see, nothing is writen, except of some previous messagges, which I dont care about:



count = 7
I use debug DX by activating the using the DirectX control panel.

Really don't know what doesn't work :(
Quote:Original post by NiGoea
AS you can see, nothing is writen, except of some previous messagges, which I dont care about:


count = 7
I use debug DX by activating the using the DirectX control panel.

Really don't know what doesn't work :(
Is there anything from D3DX though? Not D3D, but D3DX. If so, what?
Quote:Original post by Evil Steve
Is there anything from D3DX though? Not D3D, but D3DX. If so, what?


I don't know how to check D3DX debug output. How do I ?

thanks !

Quote:Original post by NiGoea
Quote:Original post by Evil Steve
Is there anything from D3DX though? Not D3D, but D3DX. If so, what?


I don't know how to check D3DX debug output. How do I ?

thanks !
It should be in the debug output along with the D3D messages, except the message will start "D3DX: " instead of "Direct3D9: "

This topic is closed to new replies.

Advertisement