Archived

This topic is now archived and is closed to further replies.

Initalization question

This topic is 5860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I have a question about Initalizing things in DirectX, Im not far enough in my program to try it out so I thought I would ask. Does the order of these two functions matter? The Book im using does:
  g_pDevice->SetRenderState( D3DRS_AMBIENT, D3DCOLOR_XRGB( 200, 200, 200 ) ); g_pDevice->SetRenderState( D3DRS_LIGHTING, TRUE ); g_pDevice->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR ); g_pDevice->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR ); g_pDevice->SetRenderState( D3DRS_EDGEANTIALIAS, TRUE ); 
and i was wondering if i could do this instead:
  g_pDevice->SetRenderState( D3DRS_AMBIENT, D3DCOLOR_XRGB( 200, 200, 200 ) ); g_pDevice->SetRenderState( D3DRS_LIGHTING, TRUE ); g_pDevice->SetRenderState( D3DRS_EDGEANTIALIAS, TRUE ); g_pDevice->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR ); g_pDevice->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR ); 

Share on other sites
No according to the DX documentation the order does not matter, and it shouldn''t anyway, because in changes the filter and the other changes a completely different thing so they dont depend on each other.

-------
Happy Coding!
Homepage: www.pcwebvia.f2s.com CVS1.0 will be released soon here.
www.bytamin-c.com

Share on other sites
Ok, Thanks a lot.