Jump to content
  • Advertisement
Sign in to follow this  
Anddos

SetVertexShaderConstantF casting

This topic is 2460 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
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:

float4x4 myMatrix

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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!