내 Render 클래스에 showMainMenu()라는 메서드가 있습니다. 에서 내가 할 비트 맵으로 렌더링 내의 ctor에서OpenGL은 메서드 내에서로드 된 텍스처 만 표시합니까?
Bitmap* bBall;
Bitmap* bWall;
Bitmap* bStart;
Bitmap* bEnd;
Bitmap* bHighscores;
Bitmap* bHelp;
Bitmap* bStar;
을 내 텍스처를 정의한 렌더링 :
showMainMenu에서this->bBall = new Bitmap("ball.bmp");
this->bEnd = new Bitmap("beenden.bmp");
this->bStart = new Bitmap("starten.bmp");
this->bStar = new Bitmap("star.bmp");
this->bHelp = new Bitmap("hilfe.bmp");
this->bHighscores = new Bitmap("highscores.bmp");
this->bWall = new Bitmap("wall.bmp");
() 나는 다음과 같은 방법으로 텍스처 바인딩 :
glEnable(GL_TEXTURE_2D); //Texturen aktivieren
//draw Start button
glBindTexture(GL_TEXTURE_2D, this->bStar->texture);
을
그러나 내 디스플레이가 흰색으로 유지됩니다. ( 내 방법 내에서 텍스처를로드 할 때
Bitmap m = Bitmap("star.bmp");
glBindTexture(GL_TEXTURE_2D, m.texture);
질감을 볼 수 있습니다. 왜 1 차가 작동하지 않습니까?
여기에 갈 정보가 너무 적습니다. 어디서 텍스쳐 객체를 생성합니까? 어디에서 텍스쳐 데이터를로드합니까? 셰이더를 사용합니까? 그렇다면 샘플러를 어디서 보내십니까 ...? 문제를 보여주는 최소한의 작업 예제를 제거하십시오. – KillianDS