GLenum OpenGLRenderer::ms_aeZBufferCompare[ZBufferState::CF_QUANTITY] = { GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL, GL_ALWAYS };
//--------------------------------------------------------- void OpenGLRenderer::SetZBufferState (ZBufferState* pkState) { if ( pkState->Enabled() ) { glEnable(GL_DEPTH_TEST); glDepthFunc(ms_aeZBufferCompare[pkState->Compare()]); } else { glDisable(GL_DEPTH_TEST); glDepthFunc(GL_ALWAYS); }
if ( pkState->Writeable() ) glDepthMask(GL_TRUE); else glDepthMask(GL_FALSE); }
|
#223-1. ¾È¿µ±â |
2004/02/27 (Fri) |
±×³É...
//--------------------------------------------------------- #define SM(gal,T_T)gl##gal(GL_DEPTH_TEST),glDepthFunc(ms_aeZBufferCompare[T_T]) void OpenGLRenderer::SetZBufferState(ZBufferState* pkState) { pkState->Enabled() ? SM(Enable,pkState->Compare()) : SM(Disable,7); glDepthMask(pkState->Writeable() ? GL_TRUE : GL_FALSE); }
|
|
|
#223-2. ¿Õ¾ÆÀú¾¾ |
2004/02/27 (Fri) |
|
|
#223-3. ¾È¿µ±â |
2004/02/27 (Fri) |
º° ¶æÀº ¾ø¾ú°í...
´ÜÁö SMgal T_T¶ó´Â ¹®ÀÚ¿ÀÌ Äڵ忡 ³ª¿Àµµ·Ï Çغ¸°í ½Í¾î¼... (À§ÀÇ ÇÔ¼ö·Î ´ëüÇصµ °á°ú°¡ ¶È°°À» °ÍÀÓ..)
|
|
|