Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


read a texture with directx 10 in c++


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
3 replies to this topic

#1 the dodger uk   Members   -  Reputation: 148

Like
0Likes
Like

Posted 27 February 2013 - 05:17 AM

i want to read in a perlin noise map  or height map , but  in the c++ side of directx

 

and  use the information in the map , to initilise particles,

 

so  i would read in map

 

width , height

 

 

for ( int width = 0 ; i < maxWidth ; i++)

{

     for ( int height= 0 ; j < maxhieght ; j++)

     {

         if ( texture[i][j].alphaAmount >0.5)

               CreateParticle(i,j);

      }

 

}

 

 

this is what i want to do , but cant see any code that will allow me , to do  this 

 

what i need to know is how to read the texture in  and the correct mannor


Edited by the dodger uk, 27 February 2013 - 06:30 AM.


Sponsor:

#2 Yourself   Crossbones+   -  Reputation: 1154

Like
0Likes
Like

Posted 27 February 2013 - 05:50 AM

Is the perlin noise texture updated on the gpu ?

if not, don't use a texture (calculate the noise on the fly or use a look-up array).

 

if it is updated on the gpu, use the map methond to read the content of the texture.



#3 Nyssa   Members   -  Reputation: 426

Like
0Likes
Like

Posted 27 February 2013 - 06:07 PM

This page has an example of reading a texture from the CPU side.



#4 the dodger uk   Members   -  Reputation: 148

Like
0Likes
Like

Posted 28 February 2013 - 01:48 PM

thank you 






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