Jump to content


Visual Studio 2005 and DirectX Lighting


  • You cannot reply to this topic
No replies to this topic

#1 jff_f

    New Member

  • Members
  • PipPip
  • 20 posts

Posted 31 October 2005 - 07:56 PM

Hi,

I was refreshing my DirectX using the tutorials found on http://www.ultimateg...rogramming.com/ and while trying to run DirectX tutorial 4, which is lighting, my screen was black.

I pasted the tutorial's code in my project... still nothing. I then tried to paste mine in the tutorial's (converted to 2005) project, it worked. I then tried to check the settings to see what is different, and one catched my eyes "Common Language Runtime support". I set it to use the old one like in the converted project from the tutorial and it worked. And I was asking myself what is wrong with the code in the tutorial and that doesn't work with de default settings. This only enables the lighting using the renderstates :


// Turn on lighting

D3D_Device->SetRenderState(D3DRS_LIGHTING, TRUE);

D3D_Device->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE);


and creating the materials and lights data. This all works now with the project settings I put... but is there anyway to make it work with the defaults (No CLR support)?


JFF





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users