開發平台(Platform): VC++
額外使用到的函數庫(Library Used): OpenGL
問題(Question):
我想要在視窗上同時畫出有texture的polygon 和沒texture的quadratic物件
但是就算我用了gluQuadricTexture(quadratic, GL_FALSE);
polygon上的texture還是會自動跑到quadratic物件上
請問這有方法解決嗎? 謝謝
以下是部份程式碼
glColor3f( 1.0f, 1.0f, 1.0f );
glBegin( GL_QUADS );
glTexCoord2f( 0.0f, 0.0f ); glVertex3f( -128.0f, -8.0f, 0.0f );
glTexCoord2f( 1.0f, 0.0f ); glVertex3f( 128.0f, -8.0f, 0.0f );
glTexCoord2f( 1.0f, 1.0f ); glVertex3f( 128.0f, -8.0f, -256.0f );
glTexCoord2f( 0.0f, 1.0f ); glVertex3f( -128.0f, -8.0f, -256.0f );
glEnd();
glTranslatef( 1.0f, 0.0f, -3.0f );
glColor3f( 1.0f, 1.0f, 0.0f );
gluQuadricTexture( quadratic, GL_FALSE );
gluSphere( quadratic, 0.5f, 32, 32 );
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 76.170.150.223
推
07/17 23:09, , 1F
07/17 23:09, 1F
→
07/17 23:18, , 2F
07/17 23:18, 2F