How to use TEXTURE on predefined objects

HI! Does anyone know ho to put texture on OpenGL pre-defined (like sphere, cube etc.) objects?
Or in general, does somebody have an example of textured (3D) object (not check example from the guide book)

Thanks in advance,


Is it the texture mapping you can’t do or the ‘pre defined’? objects?

if the predefined object has texture coordinates (like glusphere or other objects in glu extension), you just have to load the texture and enable it before drawing the object !
If it hasn’t texture coordinates, it’s more complicated…
Chack the pre-defined object documentation to see !

Are you using GLU quadrics to draw your sphere? If so, you need to call this:

Wel, it is clear to me now that one can apply textures on, for example, sphere made by gluSphere command. But stil, I do ot menage to apply it properly. Maybe I am not using parameters in the good way or something else. have to say that I am only a beginner, and you can see why
Do you have an example?

Best regards,

this is not an answer to your problem, but i too have had the same one. i can’t understand textures either. did u get any sample code from elsewhere? if so, please help. thanx!