Cześć,
mam problem z nałożeniem tekstury na sfere, tak tworzę sfere:
float rozmiar=1.0f;
//glTranslatef(0.0f,-1.0f,-5.0f);
glColor4ub(255,255,255,255);
GLUquadricObj* kwadryka=gluNewQuadric();//tworzenie obiektu kwadryki
gluQuadricDrawStyle(kwadryka,GLU_FILL);//ustalenie stylu
gluSphere(kwadryka,rozmiar,30,30);//rysowanie
gluQuadricTexture(kwadryka, GL_TRUE);//tekstura
gluDeleteQuadric(kwadryka);//usuwanie obiektu
jak mogę nałożyć teksture? próbowałem poprzez gluQuadricTexture, ale nie działa, tutaj jak wczytuje tekstury w tga, moge innym sposobem:
#define LICZBA_OB_TEXTUR 2 //liczba tesktur
GLuint obiektyTextur [LICZBA_OB_TEXTUR];
char *plikiTextur[LICZBA_OB_TEXTUR] = {"C:/Users/Desktop/Projekt/grass.tga",
"C:/Users/Desktop/Projekt/grass.tga"};