View Full Version : How to place texture on the surface of the cylinde
11-30-2009, 12:46 AM
i am newbie to openGL, i created cylinder using openGL function gluCylinder(myQuad, 0.5, 0.5, 3.0, 24, 8);
but i am not getting how to place multiple textures on the surface of the cylinder.
please guide me... any answer is valuable..
11-30-2009, 11:41 AM
Everything will be much easier if you create a cylinder on your own and define texture coordinates during vertex-definition.
Other, much harder way is automatic texture-coordinate generation.
Reference: OpenGL Programming Guide 6th Edition, pg.434-443 (Automatic Texture-Coordinate generation), and pg.443-449 (Multitexturing).
11-30-2009, 09:45 PM
Thank You Sir.
let you know after reading OpenGL Programming Guide.
12-01-2009, 09:24 PM
I followed NeHe tutorial for creating Cylinder.
and i tried to place images as texture on the surface of the cylinder, but i am unable to do that.
Please help me, any valuable answer is appreciated.
12-02-2009, 01:44 PM
Which tutorial? What's wrong?
Give us some more details.
And take a look at NeHe's Lesson 23
Sphere Mapping Quadrics In OpenGL.
12-02-2009, 09:54 PM
Thanks for your reply.
I downloaded the program which is there in NeHe's lesson 23(Game Glut code), but i am getting an error as below :
user@lxdevenv:~/Temp/sample/lesson23/lesson23$ g++ lesson23.cpp -o lesson23 -I/usr/x11R6/include/ -L/usr/lib -lX11 -lXmu -lglut -lGL -lGLU
lesson23.cpp:55: error: expected constructor, destructor, or type conversion before ‘*’ token.
What exactly it means ?
and is it necessary to learn Adobe's Photoshop program to create Sphere in lesson-23, because i think, in this lesson they use photoshop program.
please Help me Sir. waiting for your reply.
12-03-2009, 03:05 AM
This kind of compile error may be due to missing includes, are you sure they are present in /usr/x11R6/include/ ?
Instead of photoshop, you may use The Gimp, the Glass effect / apply lens is close to the spherize tool used in the tutorial.
12-06-2009, 10:45 PM
Thanks for your reply.
how to place images on the surface of the cylinder using libjpeg libraries ?
i am not getting how to place images on the object, requesting you to help me out from this problem.
I goggled it, but i dint get the correct information about it.
waiting for your reply Sir.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.