• Advertisement
Sign in to follow this  

shadow mapping

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

in this snippet code , it is located in many articles


// Create the shadow map
if( FAILED( g_pd3dDevice->CreateTexture( SHADOW_MAP_SIZE, SHADOW_MAP_SIZE, 1,
                                         D3DUSAGE_RENDERTARGET, D3DFMT_R32F,
                                         D3DPOOL_DEFAULT, &g_pShadowMap,
                                         NULL ) ) )
MessageBox( g_hWnd, "Unable to create shadow map!",
             "Error", MB_OK | MB_ICONERROR );
return E_FAIL;

// Grab the texture's surface
g_pShadowMap->GetSurfaceLevel( 0, &g_pShadowSurf );


my question is : Is this code is located into the render loop or it is located outside of it? (i mean it must be located or not into the render loop)

Edited by abdellah

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement