rendering order of skybox

if you program involve a skybox, you’d better render it first, since other object may need blending, if you render these objects before the skybox, you object will not show

the correct order like codes below:

   1: g_SkyBox->Render(g_Camera) ;
   2: g_Bullet->Render(g_Camera) ;

The incorrect order is:

   1: g_Bullet->Render(g_Camera) ;
   2: g_SkyBox->Render(g_Camera) ;

please be careful when using skybox, another thing to point out is if you use blending, you should render the object being blend later than the target background.

posted on 2010-05-17 11:00  前端风云志  阅读(498)  评论(0)    收藏  举报

导航

关注我

前端风云志