Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


direct3d 10 question


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

#1 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 13 July 2013 - 05:21 PM

I have this

 

ID3D10ShaderResourceView*                       myTexture = NULL;

ID3D10EffectShaderResourceVariable*        g_pTextureReader = NULL;

 

ID3D10EffectTechnique*                   g_pTechnique1  = NULL;
ID3D10EffectTechnique*                   g_pTechnique2 = NULL;
 
now I do this
 
g_pTextureReader ->SetResource( myTexture );
 
g_pTechnique1->GetPassByIndex( 0 )->Apply( 0 );
g_pd3dDevice->Draw(1, 0);
 
g_pTechnique2->GetPassByIndex( 0 )->Apply( 0 );
g_pd3dDevice->Draw(1, 0);
 
then I want to render to "myTexture" renderTarget, so I need to unbound "myTexture" , to do that I do this
 
g_pTextureReader ->SetResource( NULL );
g_pTechnique1->GetPassByIndex( 0 )->Apply( 0 );
g_pTechnique2->GetPassByIndex( 0 )->Apply( 0 );
 
Is this last thing the way it is done normally?
 
 
 

Edited by lomateron, 13 July 2013 - 05:30 PM.


Sponsor:

#2 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 13 July 2013 - 10:58 PM

don't know very well how the bound and unbound works, it looks like if I don't unbound them on every technique it has been bound to, the bound will be still there, so every time you want to render to a bound thing you have to remember in which technique it was bounded, and the only method I know to unbound texture is the "apply(0)" thing

 

anyone knows more?



#3 LPVOID   Members   -  Reputation: 106

Like
0Likes
Like

Posted 08 September 2013 - 09:47 PM

I know one method .when you have changed the render target ,then do this

 

    ID3D10ShaderResourceView* pSRV[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
    pDev->PSSetShaderResources( 0, _countof(pSRV), pSRV );


Edited by LPVOID, 08 September 2013 - 09:48 PM.





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