• Create Account

### #Actualjoystick-hero

Posted 06 June 2012 - 01:06 AM

Hi guys. I have a quick HLSL question. I have the following code:
cbuffer cbLights
{
Light gLight[MAX_NUMBER_LIGHTS];
matrix gLightWVP[MAX_NUMBER_LIGHTS];
}


And I want to be able to update gLight[1] individually from my c++ d3d11 application . How can I do that? I know how to do it if gLight was a single variable and not an array but this is new to me.

BTW: I'm using the effects framework provided by Microsoft in D3dx11effect.h

Regards!

### #2joystick-hero

Posted 06 June 2012 - 12:50 AM

Hi guys. I have a quick HLSL question. I have the following code:
cbuffer cbLights
{
Light gLight[MAX_NUMBER_LIGHTS];
matrix gLightWVP[MAX_NUMBER_LIGHTS];
}

And I want to be able to update gLight[1] individually from my c++ d3d11 application . How can I do that? I know how to do it if gLight was a single variable and not an array but this is new to me. Regards!

### #1joystick-hero

Posted 06 June 2012 - 12:47 AM

Hi guys. I have a quick HLSL question. I have the following code:
cbuffer cbLights
{
Light gLight[MAX_NUMBER_LIGHTS];
matrix gLightWVP[MAX_NUMBER_LIGHTS];
}

And I want to be able to update gLight[1] individually from my c++ d3d11 application . How can I do that? I know how to do it if gLight was a single variable and not an array but this is new to me. Regards!

PARTNERS