• Advertisement
Sign in to follow this  

SetVertexShaderConstantF casting

This topic is 2135 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

SetVertexShaderConstantF(UINT StartRegister,CONST float* pConstantData,UINT Vector4fCount)

on this function you have todo a float cast right on the matrix, well how would you cast the float back to a matrix and also check if its a transposed matrix?

Share this post


Link to post
Share on other sites
Advertisement
[quote] how would you cast the float back to a matrix[/quote]

Where are you trying to cast it to a matrix? The vertex shader? If so, you just declare it like so:

[code]float4x4 myMatrix[/code]

[quote]check if its a transposed matrix[/quote]

A matrix is always transposed, in the sense that it is the transpose of the transpose of itself.

Its sort of like multiplying by -1. You can multiply any number by -1, and doing it twice will give you the original number back, so it doesn't make sense to ask "is this number multiplied by -1?"

Share this post


Link to post
Share on other sites
according to my box, its casting the transposed matrix, so in that function i want to cast it back from float* to d3dxmatrix*

Share this post


Link to post
Share on other sites
i meant , according to my book , why cant i edit my replys btw?, i can only edit the first post...

Share this post


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

  • Advertisement