| Re: DX10 tutor7 Texture question |
|
 |
|
 |
|
 |
|
 |
Group: microsoft.public.win32.programmer.directx.graphics · Group Profile
Author: gdgd Date: Sep 18, 2008 08:35
"Anton Roth" wrote in message
news:u6fjHARGJHA.3720@TK2MSFTNGP02.phx.gbl...
> "gd" gawab.com> schrieb im Newsbeitrag
> news:DD0779E6-3F5F-4F07-A873-D25273A85CBD@microsoft.com...
>> i'm new in developing dx10.
>>
>> in tutorial7 are about using texture to draw on the cube.
>> i tried to make my own code like the tutorial does. i create 2 cubes that
>> the first cube using texture, the second is not.
>> but the texture shown on the second one. whats the problem perhaps?
>>
>> sorry my bad in english but thanks in advance :) .
>
> How did you render that second cube? Cause if you use the same code
>
> g_pTechnique->GetDesc( &techDesc );
> for( UINT p = 0; p < techDesc.Passes; ++p )
> {
> g_pTechnique->GetPassByIndex( p )->Apply( 0 );
> g_pd3dDevice->DrawIndexed( 36, 0, 0 );
> }
>
> you use the .fx file, which basically multiplies the vertices with the
> world / view / projection matrix, and then in the Pixel Shader applies the
> texture to it.
>
> If you want to render a second cube without any texturing you need to
> write another pass in the technique and a pixel shader which isnt using
> texture for rendering.
|