• Advertisement
Sign in to follow this  

SetIntArray doesn't work :(

This topic is 3026 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 :°(

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 !

Share this post


Link to post
Share on other sites
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"?

Share this post


Link to post
Share on other sites
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 :(

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 !

Share this post


Link to post
Share on other sites
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: "

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement