gluSphere / lesson18 / question
hi, i have a short question about lesson18/gluSphere.
i do not understand wich is the exact code wich passes the texture to the sphere.
i think it comes from "quadratic" where "quadratic" is (must?) a quadratic texture "streched" over a sphere ?
yes,my english sux.
gluQuadricTexture(quadratic, GL_TRUE);
// Create Texture Coords (NEW)
This is the line that does it. It''s in the init function
// Create Texture Coords (NEW)
This is the line that does it. It''s in the init function
thx.however i still don´t get it..
quadratic = gluNewQuadric();
gluQuadricNormals(quadratic, GLU_SMOOTH);
gluQuadricTexture(quadratic, GL_TRUE);
so gluQuadricNormals and gluQuadricTexture are given functions ?
where gluQuadricTexture is just a "description" of the bitmap-format ?
So at the beginning,i have a wall.bmp. At the end it is stored as a gluQuadricTexture in quadratic , Yes ? But i can not figure out what´s between..
also is gluQuadricTexture only used for round onjects ?
quadratic = gluNewQuadric();
gluQuadricNormals(quadratic, GLU_SMOOTH);
gluQuadricTexture(quadratic, GL_TRUE);
so gluQuadricNormals and gluQuadricTexture are given functions ?
where gluQuadricTexture is just a "description" of the bitmap-format ?
So at the beginning,i have a wall.bmp. At the end it is stored as a gluQuadricTexture in quadratic , Yes ? But i can not figure out what´s between..
also is gluQuadricTexture only used for round onjects ?
like this:
that help you??
- Jono AH
/* Get handel to quadratic */quadratic = gluNewQuadric();/* pass handel of quadratic and set its normal generation to smooth */gluQuadricNormals(quadratic, GLU_SMOOTH);/* pass hanled of quadratic and enable textue coord generation */gluQuadricTexture(quadratic, GL_TRUE);/* pass handel of texture and bind texture to anything that is subsequently drawn */glBindTexture(GL_TEXTURE_2D, texture[filter]);/* pass handel of quadratic and use it to draw a shpere type quadratic */gluSphere(quadratic,1.3f,32,32);
that help you??
- Jono AH
- JonoRule #1: If you build it, they will come -- to hack and cheat.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement