2014-04-15 13 views
0

그래서 Java 게임 (Minecraft : P)의 mod를 만들려고합니다. 문제는 스텐실 버퍼가 필요하다는 것입니다.LWJGL 디스플레이 초기화 후 스텐실 버퍼 초기화

이제 display.Create() 호출시 초기화되었는지 확인했습니다. 그러나 게임은 스텐실 버퍼를 필요로하지 않으므로 초기화되지 않습니다. 내 질문은 : 디스플레이를 초기화 한 후 스텐실 버퍼를 초기화 할 수 있습니까? 그렇지 않다면 좋은 대안이 있습니까?

미리 감사드립니다.

답변

0

포지 마인 크래프트에 대한 스텐실 버퍼와 디스플레이 초기화 :

minecraft.java에서

(버전 1.6.4)를 당신이 코드의이 라인을 찾을 수 있습니다

try 
    { 
     ForgeHooksClient.createDisplay(); 
    } 

이 메소드를 호출 :

static int stencilBits = 0; 
public static void createDisplay() throws LWJGLException 
{ 
    ImageIO.setUseCache(false); //Disable on-disc stream cache should speed up texture pack reloading. 
    PixelFormat format = new PixelFormat().withDepthBits(24); 
    try 
    { 
     //TODO: Figure out how to determine the max bits. 
     Display.create(format.withStencilBits(8)); 
     stencilBits = 8; 
    } 
    catch(LWJGLException e) 
    { 
     Display.create(format); 
     stencilBits = 0; 
    } 
} 

그래서 충분하다고 생각합니다.

+0

죄송합니다. 시간을 낭비하고 명백하게 댓글 섹션을 잘못 사용하고 있습니다. – user3159188