Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualjdub

Posted 06 February 2013 - 01:55 PM

Is it a good idea to bind all textures to the pipeline during application initialization (given that I don't have a ridiculous amount of textures I'm using)?  Right now, my render code looks something like this (pseudo code):

void Render(void)
{
  ...
  SetTexture(this->get_mesh_texture(0));
  RenderTexture();
  ...
}

void SetTexture(Texture& t)
{
   ShaderResourceView textureView = createTextureView(t);
   this->shader->bindResource(textureView);
}

 

Does it incur a lot of overhead to be creating and binding a resource view every time I render a texture?


#1jdub

Posted 06 February 2013 - 01:54 PM

Is it a good idea to bind all textures to the pipeline during application initialization (given that I don't have a ridiculous amount of textures I'm using)?  Right now, my render code looks something like this (pseudo code):

void Render(void)
{
  ...
  SetTexture(this->get_mesh_texture(0));
  ...
}

void SetTexture(Texture& t)
{
   ShaderResourceView textureView = createTextureView(t);
   this->shader->bindResource(textureView);
}

 

Does it incur a lot of overhead to be creating and binding a resource view every time I render a texture?


PARTNERS