Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actuallomateron

Posted 30 January 2013 - 08:17 PM

I crated this

 

ID3D10EffectVectorVariable*         g_pVe = NULL;

 

So I am trying to give a float4 variable called "Ve" in the .fx file a value.

This is the first time i have used a float4 variable. when i use float3 variables I use D3DXVECTOR3 struct like this:

 

g_pVe->SetFloatVector(D3DXVECTOR3(0.0f,0.0f,0.0f,0.0f));

 

There is no D3DXVECTOR4 struct so i did this:

 

vector<float> FloatVct(4);

grd[0]=0.0f;

grd[1]=0.0f;

grd[2]=0.0f;

grd[3]=0.0f;

 

g_pVe->SetFloatVector(&grd[0]);

 

Is this correct?

 

I am asking because I have a bug and I think this could be causing it. The bug is related with the 4th value of the float4 variable.


#1lomateron

Posted 30 January 2013 - 08:15 PM

I crated this

 

ID3D10EffectVectorVariable*         g_pVe = NULL;

 

So I am trying to give a float4 variable called "Ve" in the .fx file a value.

This is the first time i have used a float4 variable. when i use float3 variables I use D3DXVECTOR3 struct like this:

 

g_pVe->SetFloatVector(D3DXVECTOR3(0.0f,0.0f,0.0f,0.0f));

 

There is no D3DXVECTOR4 struct so i did this:

 

vector<float> FloatVct(4);

grd[0]=0.0f;

grd[1]=0.0f;

grd[2]=0.0f;

grd[3]=0.0f;

 

g_pVe->SetFloatVector(&grd[0]);

 

Is this correct?

 

I am asking because I have a bug and I think this could be causing it. The bug is related to do with the 4th value of the float4 variable.

 

 

 

 


PARTNERS