Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


updating array variable in constant buffer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 joystick-hero   Members   -  Reputation: 148

Like
0Likes
Like

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.

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

Regards!

Edited by joystick-hero, 06 June 2012 - 01:06 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS