public static void defineMask ( ) { GL . glDepthMask ( true ) ; GL . glClearDepth ( 1 ) ; GL . glClear ( SGL . GL_DEPTH_BUFFER_BIT ) ; GL . glDepthFunc ( SGL . GL_ALWAYS ) ; GL . glEnable ( SGL . GL_DEPTH_TEST ) ; GL . glDepthMask ( true ) ; GL . glColorMask ( false , false , false , false ) ; }
Start defining the screen mask . After calling this use graphics functions to mask out the area