Results 1 to 8 of 8

Thread: How to place texture on the surface of the cylinde

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2009
    Posts
    13

    How to place texture on the surface of the cylinde

    Hi Sir,

    i am newbie to openGL, i created cylinder using openGL function gluCylinder(myQuad, 0.5, 0.5, 3.0, 24, ;

    but i am not getting how to place multiple textures on the surface of the cylinder.

    please guide me... any answer is valuable..

    Regards
    Shivukumar

  2. #2
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: How to place texture on the surface of the cylinde

    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).

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2009
    Posts
    13

    Re: How to place texture on the surface of the cylinde

    Thank You Sir.

    let you know after reading OpenGL Programming Guide.

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2009
    Posts
    13

    Re: How to place texture on the surface of the cylinde


    Hi Sir,

    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.

    Regards
    Shivukumar

  5. #5
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,214

    Re: How to place texture on the surface of the cylinde

    Which tutorial? What's wrong?
    Give us some more details.
    And take a look at NeHe's Lesson 23
    Sphere Mapping Quadrics In OpenGL.

  6. #6
    Junior Member Newbie
    Join Date
    Nov 2009
    Posts
    13

    Re: How to place texture on the surface of the cylinde

    Hi Sir,

    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 :

    Error :


    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.


    Regards
    Shivukumar.

  7. #7
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: How to place texture on the surface of the cylinde

    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.

  8. #8
    Junior Member Newbie
    Join Date
    Nov 2009
    Posts
    13

    Re: How to place texture on the surface of the cylinde

    Hi Sir,

    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.

    Thanking You.

Similar Threads

  1. How to place images on cylinder surface in openGL
    By Ravikishore in forum OpenGL: Linux
    Replies: 2
    Last Post: 11-27-2009, 02:48 PM
  2. Place texture with mouse
    By th0r1000 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-05-2006, 05:30 AM
  3. How do I place a texture over the entire screen
    By crispy in forum OpenGL: Basic Coding
    Replies: 14
    Last Post: 03-29-2004, 06:01 AM
  4. Where to place texture generators, bindings etc. in C++ classes?
    By BigShooter in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-30-2003, 05:43 AM
  5. anyone know a good place for texture maps?
    By dodgyposse in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 09-10-2002, 11:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean